diff --git a/Jenkinsfile b/Jenkinsfile index 263578bf31..731b72a2a4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -86,9 +86,9 @@ stage('Configure') { // Avoid running the pipeline on branch indexing if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) { - print "INFO: Build skipped due to trigger being Branch Indexing" - currentBuild.result = 'ABORTED' - return + print "INFO: Build skipped due to trigger being Branch Indexing" + currentBuild.result = 'NOT_BUILT' + return } stage('Build') { diff --git a/ci/jpa-3.1-tck.Jenkinsfile b/ci/jpa-3.1-tck.Jenkinsfile index c7200e7548..ea8dd86caa 100644 --- a/ci/jpa-3.1-tck.Jenkinsfile +++ b/ci/jpa-3.1-tck.Jenkinsfile @@ -2,9 +2,9 @@ // Avoid running the pipeline on branch indexing if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) { - print "INFO: Build skipped due to trigger being Branch Indexing" - currentBuild.result = 'ABORTED' - return + print "INFO: Build skipped due to trigger being Branch Indexing" + currentBuild.result = 'NOT_BUILT' + return } pipeline { @@ -31,6 +31,8 @@ pipeline { script { // Don't build the TCK on PRs, unless they use the tck label if ( env.CHANGE_ID && !pullRequest.labels.contains( 'tck' ) ) { + print "INFO: Build skipped because pull request doesn't have 'tck' label" + currentBuild.result = 'NOT_BUILT' return } docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') { diff --git a/ci/jpa-3.2-tck.Jenkinsfile b/ci/jpa-3.2-tck.Jenkinsfile index 6f1c8f9b45..507dca2354 100644 --- a/ci/jpa-3.2-tck.Jenkinsfile +++ b/ci/jpa-3.2-tck.Jenkinsfile @@ -2,9 +2,9 @@ // Avoid running the pipeline on branch indexing if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) { - print "INFO: Build skipped due to trigger being Branch Indexing" - currentBuild.result = 'ABORTED' - return + print "INFO: Build skipped due to trigger being Branch Indexing" + currentBuild.result = 'NOT_BUILT' + return } pipeline { @@ -29,6 +29,12 @@ pipeline { stage('Build') { steps { script { + // Don't build the TCK on PRs, unless they use the tck label + if ( env.CHANGE_ID && !pullRequest.labels.contains( 'tck' ) ) { + print "INFO: Build skipped because pull request doesn't have 'tck' label" + currentBuild.result = 'NOT_BUILT' + return + } docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') { docker.image('openjdk:11-jdk').pull() } diff --git a/ci/release/Jenkinsfile b/ci/release/Jenkinsfile index 2b56e3f5cc..9324700642 100644 --- a/ci/release/Jenkinsfile +++ b/ci/release/Jenkinsfile @@ -14,7 +14,7 @@ // Avoid running the pipeline on branch indexing if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) { print "INFO: Build skipped due to trigger being Branch Indexing" - currentBuild.result = 'ABORTED' + currentBuild.result = 'NOT_BUILT' return } diff --git a/ci/snapshot-publish.Jenkinsfile b/ci/snapshot-publish.Jenkinsfile index 18e1119afa..be02d00d2e 100644 --- a/ci/snapshot-publish.Jenkinsfile +++ b/ci/snapshot-publish.Jenkinsfile @@ -5,9 +5,9 @@ // Avoid running the pipeline on branch indexing if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) { - print "INFO: Build skipped due to trigger being Branch Indexing" - currentBuild.result = 'ABORTED' - return + print "INFO: Build skipped due to trigger being Branch Indexing" + currentBuild.result = 'NOT_BUILT' + return } pipeline { diff --git a/nightly.Jenkinsfile b/nightly.Jenkinsfile index 2c94bc569c..7b23c539a4 100644 --- a/nightly.Jenkinsfile +++ b/nightly.Jenkinsfile @@ -66,9 +66,9 @@ stage('Configure') { // Avoid running the pipeline on branch indexing if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) { - print "INFO: Build skipped due to trigger being Branch Indexing" - currentBuild.result = 'ABORTED' - return + print "INFO: Build skipped due to trigger being Branch Indexing" + currentBuild.result = 'NOT_BUILT' + return } stage('Build') {