Jenkins: Scripted vs Declarative Pipelines

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/throwhttps://jenkins.io/doc/book/pipeline/syntax/#flow-control

 

Notes:

  • Declarative pipelines have a pipeline block. e.g.

  • executing a scripted pipeline in a Declarative Pipeline

a script step takes a block of Scripted Pipeline and executes that in the Declarative Pipeline

Leave a Reply

Your email address will not be published. Required fields are marked *