Jenkinsfile: prevent PRs to master

I just merged a PR to master by mistake. Whoops! Let's not let that happen again.
master
krzys-h 2017-05-29 21:09:50 +02:00
parent daacd0036f
commit 92a8140b77
2 changed files with 5 additions and 1 deletions

4
Jenkinsfile vendored
View File

@ -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

@ -1 +1 @@
Subproject commit 3cf809d6a36d3834a97c8cede250b15ec4473539
Subproject commit f4c4364f00afe2a754204dec387cd80124b15c3a