DevOps Classroom Series – 02/Oct/2020

Jenkins Pipelines contd..

  • Jenkins Job Build Triggers:
    • Scripted Pipeline:
      • Use the properties section to create a build trigger
        • In the below example we will be using build periodically for every 1 Hour from Monday to Friday Refer Here Preview
      • In scripted for pollSCM properties(pollSCM('* * * * 1-5'))
    • Declarative Pipeline
      • For basic Declarative Pipeline Refer Here
      • Lets add build periodically just like the scripted pipeline Refer Here
      • For Poll scm
      pipeline {
          agent { label 'HRMS&&QA' }
          triggers { pollSCM('* * * * 1-5') }
          stages {
              stage('git'){
                  steps {
                      git branch: 'DeclarativePipeline', url: 'https://github.com/dummyrepos/game-of-life.git'
                  }
              }
              stage('compile') {
                  steps {
                      sh 'mvn clean package'
                  }
              }
          }
      }
      
      • If you want to ask for user input while the job is execution we have step called as input Refer Here
  • Parameters:
  • Sleep & WaitUntil:

Leave a Reply

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

Please turn AdBlock off
Floating Social Media Icons by Acurax Wordpress Designers

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