Mark Waite:
> We've had many users that expected Jenkins Pipeline to be Groovy
> (especially scripted Pipeline users) instead of being a domain
> specific language that is based on Groovy. I fear that linking
> to more details of Groovy syntax will tend to confuse those users
> even more rather than clarify for them.
If the declarative syntax of Jenkins is not a strict sub- or
superset of Groovy, and if the differences are not easy to list,
then I agree.
> The syntax of Declarative Pipeline is quite specific to Jenkins.
> Linking from Declarative Pipeline documentation to the Groovy
> syntax seems to me like it will be more likely to confuse users
> rather than clarify for them. Declarative Pipeline is well
> suited for use in the Blue Ocean pipeline editor and in defining
> Pipelines with Jenkins.
Then my question remains: where can I find the specification, or at
least a reasonably detailed descriptionp[1], of the Jenkins
declarative syntax? The only description that I have been able to
locate is:
https://www.jenkins.io/doc/book/pipeline/#declarative-pipeline-fundamentals ,
but instead of specifying or describing the syntax, it gives a
small example and calls it a day. If Jenkins users ought not to
study the declarative syntax from the Groovy documenation, Jenkins
should provide its own. And it should be sufficient for writing a
Jenkinsfile without asking here or looking elsewhere.
> I'd rather include specific descriptions of syntax rules for
> single quote and double quote strings and for variable expansion
> rather than link to the Groovy documentation.
That would be great. Has this not come up before? How do users
learn the declarative syntax?
1. With the example of Markdown,
Description:
https://daringfireball.net/projects/markdown/syntax
Specification:
https://spec.commonmark.org/0.29/
Another good example is the C programming language, specified in
an ISO standard and described in the famous book by K&R.
In the long run, I think both are needed, but I should be happy
with just a more detailed informal description.