Skip to content

Commit a3034ef

Browse files
committed
Allow builds with test jdk versions on PRs with custom labels
1 parent 4843cfc commit a3034ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Jenkinsfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ stage('Build') {
101101
Map<String, Closure> executions = [:]
102102
Map<String, Map<String, String>> state = [:]
103103
environments.each { BuildEnvironment buildEnv ->
104-
// Don't build environments for newer JDKs when this is a PR
105-
if ( helper.scmSource.pullRequest && buildEnv.testJdkVersion ) {
104+
// Don't build environments for newer JDKs when this is a PR, unless the PR is labelled with 'jdk' or 'jdk-<version>'
105+
if ( helper.scmSource.pullRequest && buildEnv.testJdkVersion &&
106+
( !pullRequest.labels.contains( 'jdk' ) || !pullRequest.labels.contains( "jdk-${buildEnv.testJdkVersion}" ) ) ) {
106107
return
107108
}
108109
state[buildEnv.tag] = [:]

0 commit comments

Comments
 (0)