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') {

    }
    stage('BUILD'){

    }
}
  • 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

Preview

Preview

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

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube