Jenkinsfile: prevent PRs to master
I just merged a PR to master by mistake. Whoops! Let's not let that happen again.coolant-mod
parent
3cf809d6a3
commit
f4c4364f00
|
@ -5,6 +5,10 @@ if (env.BRANCH_NAME.startsWith('PR-')) {
|
|||
properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '30', artifactNumToKeepStr: '5']]])
|
||||
}
|
||||
|
||||
if (env.CHANGE_TARGET == 'master') {
|
||||
error("This pull request targets the wrong branch. Please reopen the pull request targetting the dev branch.")
|
||||
}
|
||||
|
||||
node('master') {
|
||||
stage('Pull changes') {
|
||||
checkout scm
|
||||
|
|
Loading…
Reference in New Issue