CI: Use proper credentials for Security testsuite checkout

Can't do anonymous http checkout from Security-testsuite.
Need to use same credentials as the gerrit review checkout.

Change-Id: I87af68c995cb8926f5e87f9af245600d76984f05
15
George Joseph 7 years ago
parent fad0714c27
commit 07d6e2bf16

@ -170,6 +170,8 @@ pipeline {
sh "sudo rm -rf ${groupDir} || : " sh "sudo rm -rf ${groupDir} || : "
withCredentials([usernamePassword(credentialsId: "${JENKINS_GERRIT_CREDS}",
passwordVariable: 'GERRIT_USER_PW', usernameVariable: 'GERRIT_USER_NAME')]) {
checkout scm: [$class: 'GitSCM', checkout scm: [$class: 'GitSCM',
branches: [[name: "${BRANCH_NAME}"]], branches: [[name: "${BRANCH_NAME}"]],
extensions: [ extensions: [
@ -181,8 +183,12 @@ pipeline {
shallow: true shallow: true
], ],
], ],
userRemoteConfigs: [[name: env.GERRIT_NAME, url: testsuiteUrl]] userRemoteConfigs: [[
name: env.GERRIT_NAME,
url: testsuiteUrl,replaceAll("http(s)?://", "http\$1://${GERRIT_USER_NAME}@")
]]
] ]
}
sh "sudo tests/CI/runTestsuite.sh --testsuite-dir='${groupDir}' --testsuite-command='${groupTestcmd}'" sh "sudo tests/CI/runTestsuite.sh --testsuite-dir='${groupDir}' --testsuite-command='${groupTestcmd}'"

Loading…
Cancel
Save