Skip to content

Commit

Permalink
Set Branch Specifier as parameter (adoptium#4585)
Browse files Browse the repository at this point in the history
- If LIGHT_WEIGHT_CHECKOUT=true, set Repository URL explicitly and set Branch Specifier as parameter
- If LIGHT_WEIGHT_CHECKOUT=false, set both Repository URL and Branch Specifier as parameter

Once https://issues.jenkins.io/browse/JENKINS-42971 is fully resolved, we should remove LIGHT_WEIGHT_CHECKOUT parameter
as LIGHT_WEIGHT_CHECKOUT=true should always be set.

resolves: adoptium#4580

Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>
  • Loading branch information
llxia authored May 24, 2023
1 parent 05018f4 commit bbad203
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions buildenv/jenkins/testJobTemplate
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,17 @@ def ADOPTOPENJDK_BRANCH = "master"
def USE_TESTENV_PROPERTIES = false
def SETUP_JCK_RUN = false

// Jenkins does not support using Repository URL and Branch build parameters with lightweight checkout together
// (See https://issues.jenkins.io/browse/JENKINS-48431)
// Set Repository URL and Branch as build parameters by default
// If LIGHT_WEIGHT_CHECKOUT is set to true, set Repository URL and Branch to its explicit value
// https://issues.jenkins.io/browse/JENKINS-42971 is resolved, but it seems to be a partial fix for Branch Specifier parameter.
// Repository URL still has problem with lightweight checkout
// Set Repository URL and Branch Specifier as build parameters by default
// If LIGHT_WEIGHT_CHECKOUT is set to true, set Repository URL to its explicit value and keep Branch Specifier as parameter
def ADOPTOPENJDK_REPO_BUILD_PARAM = '${ADOPTOPENJDK_REPO}'
def ADOPTOPENJDK_BRANCH_BUILD_PARAM = '${ADOPTOPENJDK_BRANCH}'
def SCRIPT_PATH = "aqa-tests/buildenv/jenkins/openjdk_tests"

LIGHT_WEIGHT_CHECKOUT = LIGHT_WEIGHT_CHECKOUT.toBoolean()
if (LIGHT_WEIGHT_CHECKOUT) {
ADOPTOPENJDK_REPO_BUILD_PARAM = ADOPTOPENJDK_REPO
ADOPTOPENJDK_BRANCH_BUILD_PARAM = ADOPTOPENJDK_BRANCH
SCRIPT_PATH = "buildenv/jenkins/openjdk_tests"
}

Expand Down Expand Up @@ -458,7 +457,7 @@ ARCH_OS_LIST.each { ARCH_OS ->
relativeTargetDirectory('aqa-tests')
cleanBeforeCheckout()
pruneStaleBranch()
wipeOutWorkspace()
wipeOutWorkspace()
cloneOptions {
depth(1)
shallow(true)
Expand Down

0 comments on commit bbad203

Please sign in to comment.