We have been using Jenkins for Continuous Integration for some time.
A typical build job specifies the SVN repository and credentials in the "Source Code Management" section, then in the "Build Triggers" section we enable "Poll SCM" with a polling schedule of every 10 minutes (H/10 * * * *).
We have updated to the latest version of Jenkins and are looking to set up pipeline builds. A typical pipeline script looks like:
node {
stage 'Build'
build job: 'MyApplication Build'
stage 'Deploy to test environment'
build job: 'MyApplication Deploy', parameters: [
[$class: 'StringParameterValue', name: 'DatabaseServer', value: 'DatabaseServer1'],
[$class: 'StringParameterValue', name: 'WebServer', value: 'WebServer1']
]
stage 'RunIntegrationTests'
build job: 'MyApplication Test', parameters: [
[$class: 'StringParameterValue', name: 'DatabaseServer', value: 'DatabaseServer1'],
[$class: 'StringParameterValue', name: 'WebServer', value: 'WebServer1']
]
}
When the pipeline job is triggered manually then everything runs fine, however we would like this pipeline to be run every time a new revision is checked in to the SVN repository. The pipeline configuration does have a "poll SCM" build trigger option, but does not have a "Source Code Management" section where you can specify your repository. How can we achieve this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…