DevOps Classroom Series – 26/Dec/2019 – Jenkins Pipeline

Jenkins Pipeline Syntax

  • Pipelines are written in Groovy language.
  • Jenkins has defined certain Functions and blocks
  • Jenkins has Developed DSL (Domain Specific Language)

Jenkins Pipeline – Important Definitions

  • Node: Machine where Jobs get executed. Node is idenified by labels
node('LABEL') {
    // your build config
  • Stage: Complete build activity can be broken into multiple stages.
stage('<Stage name>') {


# Generally stages are part of nodes

node('MAVEN') {
    stage('GIT') {


  • shell: Executing shell in jenkins
sh <command>

sh 'mvn clean'
  • git: Executes the git clone and pull operation. Refer here
git '<url>'

Quick Wins for generating pipelines.

  • Create a jenkins pipeline project and navigate to pipeline section perform the below steps Preview




  • Try to generate pipeline steps for individual activities from Freestyle Projects.
  • Exercise-1: Convert every Free-Style Project to Jenkins Pipeline
  • Exercise-2: Create a pipeline project with parameters

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner