diff --git a/Jenkinsfile b/Jenkinsfile index b8799520ae58..2d6d9db78255 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -100,8 +100,9 @@ stage('Build') { Map executions = [:] Map> state = [:] environments.each { BuildEnvironment buildEnv -> - // Don't build environments for newer JDKs when this is a PR - if ( helper.scmSource.pullRequest && buildEnv.testJdkVersion ) { + // Don't build environments for newer JDKs when this is a PR, unless the PR is labelled with 'jdk' or 'jdk-' + if ( helper.scmSource.pullRequest && buildEnv.testJdkVersion && + !pullRequest.labels.contains( 'jdk' ) && !pullRequest.labels.contains( "jdk-${buildEnv.testJdkVersion}" ) ) { return } state[buildEnv.tag] = [:]