diff --git a/Jenkinsfile b/Jenkinsfile index 331901d8663a..3f10b2b617c0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -118,8 +118,10 @@ def mavenBuild(jdk, cmdline, mvnName) { echo "Not using build cache" extraArgs = " -Dmaven.test.failure.ignore=true -Dmaven.build.cache.enabled=false " } - if (pullRequest.labels.contains("build-all-tests")) { - extraArgs = " -Dmaven.test.failure.ignore=true " + if (env.BRANCH_NAME ==~ /PR-\d+/) { + if (pullRequest.labels.contains("build-all-tests")) { + extraArgs = " -Dmaven.test.failure.ignore=true " + } } sh "mvn $extraArgs -DsettingsPath=$GLOBAL_MVN_SETTINGS -Dmaven.repo.uri=http://nexus-service.nexus.svc.cluster.local:8081/repository/maven-public/ -ntp -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -V -B -e -U $cmdline" }