Skip to content

Commit 7e199fe

Browse files
mbelladeyrodiere
authored andcommitted
Allow builds with test jdk versions on PRs with custom labels
1 parent 23ac16c commit 7e199fe

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
@@ -100,8 +100,9 @@ stage('Build') {
100100
Map<String, Closure> executions = [:]
101101
Map<String, Map<String, String>> state = [:]
102102
environments.each { BuildEnvironment buildEnv ->
103-
// Don't build environments for newer JDKs when this is a PR
104-
if ( helper.scmSource.pullRequest && buildEnv.testJdkVersion ) {
103+
// Don't build environments for newer JDKs when this is a PR, unless the PR is labelled with 'jdk' or 'jdk-<version>'
104+
if ( helper.scmSource.pullRequest && buildEnv.testJdkVersion &&
105+
!pullRequest.labels.contains( 'jdk' ) && !pullRequest.labels.contains( "jdk-${buildEnv.testJdkVersion}" ) ) {
105106
return
106107
}
107108
state[buildEnv.tag] = [:]

0 commit comments

Comments
 (0)