Hi -
The main reason I'm sending this email is that we're probably going to be doing some form of Declarative YAML syntax as a native part of Declarative itself in the future - no specific details, plans, or timeline yet, but I'd expect a JEP to land in the fall once some other work of mine wraps up. This'll be similar from an authoring perspective to Abhishek's work, but not exactly - since it'll be pure Declarative (with the YAML being parsed into the same intermediate form we parse the Groovy pipeline {} block and JSON used with the Blue Ocean Pipeline Editor into, and then we'll transform that intermediate form into the actual execution AST at runtime, just as we do with the Groovy pipeline {} block), it'll cover the full range of Declarative syntax (except for, probably, script {} blocks and when { expression {} }). A Declarative YAML file will be able to be converted to a Groovy Jenkinsfile and vice versa - they'll really just be two different syntaxes for the exact same backend and execution engine.
This means that the eventual native Declarative YAML syntax won't support things that aren't part of Declarative proper - at a glance, that would mean that the PR configuration, reports, and archive management aspects of Abhishek's work wouldn't be part of the native Declarative YAML syntax, since they aren't Declarative directives. There also might be syntax detail differences - I haven't done any work yet on designing the native Declarative YAML syntax, so I don't yet know how we'll represent credentials, etc, and I'll try to have that design match Abhishek's as closely as I can, but for technical or usability reasons, there may need to be divergences.
So now I'm thinking some on how we can have compatibility for a YAML file between Abhishek's work and the eventual native Declarative implementation. Regrettably, I haven't spent enough time going through the code to see if there's a clean way to fit the PR/reports/archive functionality into the Declarative syntax model, but I have a feeling there isn't a good way to do so - since they result in autogenerated stages, meaning they're not Declarative options, wrappers, etc. I'm also a bit nervous over the use of Jenkinsfile.yaml as the "marker" file - that'd mean that unless a YAML file written for Abhishek's work could be read and handled by the eventual native Declarative implementation, we'd need a different name for the Declarative YAML file, creating which could be confusing for users.
I don't have a solid plan/suggestion/etc for what to do here, I'll confess. It might make the most sense for Abhishek's work to use a less "official" sounding filename than Jenkinsfile.yaml - perhaps a name that shows that file is going to be read and used by the Simple Pull Request plugin's implementation. Something similar in terms of display names would probably also make sense - if this isn't going to be part of the "core" Pipeline suite, its naming/terminology/etc should probably make its purpose and origin more clear?
Again, I have nothing but praise for your work, Abhishek, and I am really sorry to be requesting changes like this. I'm just trying to think about futureproofing to prevent conflicting behavior, user confusion, etc in the future.
A.