Jenkins: Scripted vs Declarative Pipelines



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



  • 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