File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff 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
99105stage(' Build' ) {
100106 Map<String , Closure > executions = [:]
Original file line number Diff line number Diff line change @@ -6,17 +6,11 @@ if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) {
66 currentBuild.result = 'NOT_BUILT'
77 return
88}
9- def throttleCount
10- // Don't build the TCK on PRs, unless they use the tck label
11- if ( env.CHANGE_ID != null ) {
12- if ( !pullRequest.labels.contains( 'tck' ) ) {
13- print "INFO: Build skipped because pull request doesn't have 'tck' label"
14- return
15- }
16- throttleCount = 20
17- }
18- else {
19- throttleCount = 1
9+ // This is a limited maintenance branch, so don't run this on pushes to the branch, only on PRs
10+ if ( !env.CHANGE_ID ) {
11+ print "INFO: Build skipped because this job should only run for pull request, not for branch pushes"
12+ currentBuild.result = 'NOT_BUILT'
13+ return
2014}
2115
2216pipeline {
@@ -25,7 +19,6 @@ pipeline {
2519 jdk 'OpenJDK 17 Latest'
2620 }
2721 options {
28- rateLimitBuilds(throttle: [count: throttleCount, durationName: 'day', userBoost: true])
2922 buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3'))
3023 disableConcurrentBuilds(abortPrevious: true)
3124 }
You can’t perform that action at this time.
0 commit comments