Skip to content

Commit

Permalink
Set NOT_BUILT status on master with BranchEventCause (#2041)
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed May 4, 2023
1 parent 0a2fe74 commit 69eec68
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
properties([disableConcurrentBuilds(abortPrevious: true), buildDiscarder(logRotator(numToKeepStr: '7'))])

if (BRANCH_NAME == 'master' && currentBuild.buildCauses*._class == ['jenkins.branch.BranchEventCause']) {
currentBuild.result = 'NOT_BUILT'
error 'No longer running builds on response to master branch pushes. If you wish to cut a release, use “Re-run checks” from this failing check in https://github.com/jenkinsci/bom/commits/master'
}

Expand Down

0 comments on commit 69eec68

Please sign in to comment.