Skip to content

Commit c215386

Browse files
committed
Do not run the Jenkinsfile build on push to the branch
1 parent 4d0c54d commit c215386

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Jenkinsfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) {
9595
currentBuild.result = 'NOT_BUILT'
9696
return
9797
}
98+
// This is a limited maintenance branch, so don't run this on pushes to the branch, only on PRs
99+
if ( !env.CHANGE_ID ) {
100+
print "INFO: Build skipped because this job should only run for pull request, not for branch pushes"
101+
currentBuild.result = 'NOT_BUILT'
102+
return
103+
}
98104

99105
stage('Build') {
100106
Map<String, Closure> executions = [:]

0 commit comments

Comments
 (0)