597 views 11 secs 0 comments

Jenkins Declarative Pipeline

In General
May 28, 2019


Jenkins Declarative Pipeline

Jenkins provides you with two ways of developing your pipeline code: Scripted and Declarative. Scripted pipelines, also known as “traditional” pipelines, are based on Groovy as their Domain-specific language. On the other hand, Declarative pipelines provide a simplified and more friendly syntax with specific statements for defining them, without needing to learn Groovy.

In this blog post we will cover all the directives available to develop your Declarative pipeline script, which will provide a clear picture on its functionality.

A valid Declarative pipeline must be defined with the “pipeline” sentence and include the next required sections:

Also, these are the available directives:

  • environment (Defined at stage or pipeline level)
  • input (Defined at stage level)
  • options (Defined at stage or pipeline level)
  • parallel
  • parameters
  • post
  • script
  • tools
  • triggers
  • when

We will now describe each of the listed directives/sections, starting with…



Continue reading on source link

Leave a Reply
You must be logged in to post a comment.