Skip to content

Instantly share code, notes, and snippets.

@eh-am
Created February 6, 2019 19:32
Show Gist options
  • Save eh-am/26725906257de5d1e1e3e2ef35f99494 to your computer and use it in GitHub Desktop.
Save eh-am/26725906257de5d1e1e3e2ef35f99494 to your computer and use it in GitHub Desktop.
Jenkins JOB DSL poll scm
          pipelineJob('my_project') {
		        triggers{
              scm('H/5 * * * *')
            }

            definition {
              cpsScm { 
                scm { 
                  git { 
                    remote {
                      url('my_repo')
                      credentials('bitbucket-ssh-key')
                    } 
                    branches('master')
                    scriptPath('Jenkinsfile')
                  } 
                } 
              } 
            }
          }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment