Jenkinsfile: prevent PRs to master
I just merged a PR to master by mistake. Whoops! Let's not let that happen again.master
parent
daacd0036f
commit
92a8140b77
|
@ -5,6 +5,10 @@ if (env.BRANCH_NAME.startsWith('PR-')) {
|
|||
properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '30', artifactNumToKeepStr: '20']]])
|
||||
}
|
||||
|
||||
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
|
||||
|
|
2
data
2
data
|
@ -1 +1 @@
|
|||
Subproject commit 3cf809d6a36d3834a97c8cede250b15ec4473539
|
||||
Subproject commit f4c4364f00afe2a754204dec387cd80124b15c3a
|
Loading…
Reference in New Issue