Skip to content

Commit bbad203

Browse files
authored
Set Branch Specifier as parameter (#4585)
- 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: #4580 Signed-off-by: Lan Xia <[email protected]>
1 parent 05018f4 commit bbad203

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

buildenv/jenkins/testJobTemplate

+5-6
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,17 @@ def ADOPTOPENJDK_BRANCH = "master"
144144
def USE_TESTENV_PROPERTIES = false
145145
def SETUP_JCK_RUN = false
146146

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

155155
LIGHT_WEIGHT_CHECKOUT = LIGHT_WEIGHT_CHECKOUT.toBoolean()
156156
if (LIGHT_WEIGHT_CHECKOUT) {
157157
ADOPTOPENJDK_REPO_BUILD_PARAM = ADOPTOPENJDK_REPO
158-
ADOPTOPENJDK_BRANCH_BUILD_PARAM = ADOPTOPENJDK_BRANCH
159158
SCRIPT_PATH = "buildenv/jenkins/openjdk_tests"
160159
}
161160

@@ -458,7 +457,7 @@ ARCH_OS_LIST.each { ARCH_OS ->
458457
relativeTargetDirectory('aqa-tests')
459458
cleanBeforeCheckout()
460459
pruneStaleBranch()
461-
wipeOutWorkspace()
460+
wipeOutWorkspace()
462461
cloneOptions {
463462
depth(1)
464463
shallow(true)

0 commit comments

Comments
 (0)