Skip to content

Commit 381cd3e

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ 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-<version>'
105+
if ( helper.scmSource.pullRequest && buildEnv.testJdkVersion && !pullRequest.labels.contains( "jdk-${buildEnv.testJdkVersion}" ) ) {
106106
return
107107
}
108108
state[buildEnv.tag] = [:]

0 commit comments

Comments
 (0)