https://jenkins.io/doc/book/pipeline/syntax/#compare
and
https://jenkins.io/doc/book/pipeline/syntax/#scripted-pipeline
Scripted is a general purpose DSL and executed from the top of a Jenkinsfile
downwards like most traditional scripts in Groovy.
E.g. of if/else
and try/catch/throw
– https://jenkins.io/doc/book/pipeline/syntax/#flow-control
Notes:
- Declarative pipelines have a
pipeline
block. e.g.
1 2 3 |
pipeline { /*... code here ...*/ } |
- executing a scripted pipeline in a Declarative Pipeline
a script
step takes a block of Scripted Pipeline and executes that in the Declarative Pipeline