From 6d4e5c806ebcb593815ce23e21762cd0672de9cc Mon Sep 17 00:00:00 2001 From: Enrico Olivelli Date: Wed, 28 Nov 2018 09:19:52 +0100 Subject: [PATCH] Use ${sha1} instead of ${ghprbActualCommit} for Pre-commit Jobs Descriptions of the changes in this PR: ### Motivation According to the documentation of the GitHub Pull Request plugin: - ${sha1} means a commit which is the result of merging the PR branch with the target branch - ${ghprbActualCommit} is directly the PR branch So currently we are not testing the PR branch against the target branch, but only the branch "as it is" see: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&ved=2ahUKEwje0PjpnuDeAhUF2SwKHXN4BgYQFjADegQIAxAB&url=https%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FGitHub%2Bpull%2Brequest%2Bbuilder%2Bplugin&usg=AOvVaw2XvPL5ynRYnqVEWqpe9cs1 ### Changes Use ${sha1} instead of ${ghprbActualCommit} for Pre-commit Jobs Reviewers: Ivan Kelly , Sijie Guo This closes #1818 from eolivelli/fix/jenskin-use-sha1 --- .../jenkins/job_bookkeeper_precommit_bookie_tests.groovy | 2 +- .../jenkins/job_bookkeeper_precommit_client_tests.groovy | 2 +- .../jenkins/job_bookkeeper_precommit_integrationtests.groovy | 2 +- .test-infra/jenkins/job_bookkeeper_precommit_java8.groovy | 2 +- .test-infra/jenkins/job_bookkeeper_precommit_java9.groovy | 2 +- .../jenkins/job_bookkeeper_precommit_remaining_tests.groovy | 2 +- .../jenkins/job_bookkeeper_precommit_replication_tests.groovy | 2 +- .test-infra/jenkins/job_bookkeeper_precommit_tls_tests.groovy | 2 +- .test-infra/jenkins/job_bookkeeper_precommit_validation.groovy | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.test-infra/jenkins/job_bookkeeper_precommit_bookie_tests.groovy b/.test-infra/jenkins/job_bookkeeper_precommit_bookie_tests.groovy index f0e9ec085e4..8f8e5ae5017 100644 --- a/.test-infra/jenkins/job_bookkeeper_precommit_bookie_tests.groovy +++ b/.test-infra/jenkins/job_bookkeeper_precommit_bookie_tests.groovy @@ -35,7 +35,7 @@ freeStyleJob('bookkeeper_precommit_bookie_tests') { 'JDK 1.8 (latest)', 200, 'ubuntu', - '${ghprbActualCommit}') + '${sha1}') // Sets that this is a PreCommit job. common_job_properties.setPreCommit( diff --git a/.test-infra/jenkins/job_bookkeeper_precommit_client_tests.groovy b/.test-infra/jenkins/job_bookkeeper_precommit_client_tests.groovy index b09607c51bd..9240099ae59 100644 --- a/.test-infra/jenkins/job_bookkeeper_precommit_client_tests.groovy +++ b/.test-infra/jenkins/job_bookkeeper_precommit_client_tests.groovy @@ -35,7 +35,7 @@ freeStyleJob('bookkeeper_precommit_client_tests') { 'JDK 1.8 (latest)', 200, 'ubuntu', - '${ghprbActualCommit}') + '${sha1}') // Sets that this is a PreCommit job. common_job_properties.setPreCommit( diff --git a/.test-infra/jenkins/job_bookkeeper_precommit_integrationtests.groovy b/.test-infra/jenkins/job_bookkeeper_precommit_integrationtests.groovy index 7a169cb9da3..cda3d9be027 100644 --- a/.test-infra/jenkins/job_bookkeeper_precommit_integrationtests.groovy +++ b/.test-infra/jenkins/job_bookkeeper_precommit_integrationtests.groovy @@ -32,7 +32,7 @@ freeStyleJob('bookkeeper_precommit_integrationtests') { 'JDK 1.8 (latest)', 200, 'ubuntu', - '${ghprbActualCommit}') + '${sha1}') throttleConcurrentBuilds { // limit builds to 1 per node to avoid conflicts on building docker images diff --git a/.test-infra/jenkins/job_bookkeeper_precommit_java8.groovy b/.test-infra/jenkins/job_bookkeeper_precommit_java8.groovy index 67d7646432e..6a888fdbe06 100644 --- a/.test-infra/jenkins/job_bookkeeper_precommit_java8.groovy +++ b/.test-infra/jenkins/job_bookkeeper_precommit_java8.groovy @@ -44,7 +44,7 @@ mavenJob('bookkeeper_precommit_pullrequest_java8') { 'JDK 1.8 (latest)', 200, 'ubuntu', - '${ghprbActualCommit}') + '${sha1}') // Sets that this is a PreCommit job. common_job_properties.setPreCommit( diff --git a/.test-infra/jenkins/job_bookkeeper_precommit_java9.groovy b/.test-infra/jenkins/job_bookkeeper_precommit_java9.groovy index 43cb02b69f0..6b02857bb94 100644 --- a/.test-infra/jenkins/job_bookkeeper_precommit_java9.groovy +++ b/.test-infra/jenkins/job_bookkeeper_precommit_java9.groovy @@ -44,7 +44,7 @@ mavenJob('bookkeeper_precommit_pullrequest_java9') { 'JDK 1.9 (latest)', 200, 'ubuntu', - '${ghprbActualCommit}') + '${sha1}') // Sets that this is a PreCommit job. common_job_properties.setPreCommit( diff --git a/.test-infra/jenkins/job_bookkeeper_precommit_remaining_tests.groovy b/.test-infra/jenkins/job_bookkeeper_precommit_remaining_tests.groovy index d57605bdf96..f3f560393da 100644 --- a/.test-infra/jenkins/job_bookkeeper_precommit_remaining_tests.groovy +++ b/.test-infra/jenkins/job_bookkeeper_precommit_remaining_tests.groovy @@ -39,7 +39,7 @@ freeStyleJob('bookkeeper_precommit_remaining_tests') { 'JDK 1.8 (latest)', 200, 'ubuntu', - '${ghprbActualCommit}') + '${sha1}') // Sets that this is a PreCommit job. common_job_properties.setPreCommit( diff --git a/.test-infra/jenkins/job_bookkeeper_precommit_replication_tests.groovy b/.test-infra/jenkins/job_bookkeeper_precommit_replication_tests.groovy index 61893bac041..21342800582 100644 --- a/.test-infra/jenkins/job_bookkeeper_precommit_replication_tests.groovy +++ b/.test-infra/jenkins/job_bookkeeper_precommit_replication_tests.groovy @@ -35,7 +35,7 @@ freeStyleJob('bookkeeper_precommit_replication_tests') { 'JDK 1.8 (latest)', 200, 'ubuntu', - '${ghprbActualCommit}') + '${sha1}') // Sets that this is a PreCommit job. common_job_properties.setPreCommit( diff --git a/.test-infra/jenkins/job_bookkeeper_precommit_tls_tests.groovy b/.test-infra/jenkins/job_bookkeeper_precommit_tls_tests.groovy index 1adc19e89a4..af0038d4cf2 100644 --- a/.test-infra/jenkins/job_bookkeeper_precommit_tls_tests.groovy +++ b/.test-infra/jenkins/job_bookkeeper_precommit_tls_tests.groovy @@ -35,7 +35,7 @@ freeStyleJob('bookkeeper_precommit_tls_tests') { 'JDK 1.8 (latest)', 200, 'ubuntu', - '${ghprbActualCommit}') + '${sha1}') // Sets that this is a PreCommit job. common_job_properties.setPreCommit( diff --git a/.test-infra/jenkins/job_bookkeeper_precommit_validation.groovy b/.test-infra/jenkins/job_bookkeeper_precommit_validation.groovy index 57a2791ce5b..e9336e070fc 100644 --- a/.test-infra/jenkins/job_bookkeeper_precommit_validation.groovy +++ b/.test-infra/jenkins/job_bookkeeper_precommit_validation.groovy @@ -35,7 +35,7 @@ mavenJob('bookkeeper_precommit_pullrequest_validation') { 'JDK 1.8 (latest)', 200, 'ubuntu', - '${ghprbActualCommit}') + '${sha1}') // Sets that this is a PreCommit job. common_job_properties.setPreCommit(