Make LAVA_CREDENTIALS customizable
This will allow for different submission profiles, some account may be
able to submit to certain devices, and not others, therefore allowing
disabling of certain device-types if required.
Change-Id: I57f2ea65b3b9a7e5296c826796d4f7aa87273703
diff --git a/jenkins/ci.jpl b/jenkins/ci.jpl
index 282d778..e1a1493 100644
--- a/jenkins/ci.jpl
+++ b/jenkins/ci.jpl
@@ -64,6 +64,8 @@
params += string(name: 'BUILD_NUMBER', value: "${build_res.number}")
params += string(name: 'BUILD_URL', value: build_url)
params += string(name: 'LAVA_URL', value: env.LAVA_URL)
+ params += string(name: 'CI_SCRIPTS_BRANCH', value: env.CI_SCRIPTS_BRANCH)
+ params += string(name: 'LAVA_CREDENTIALS', value: env.LAVA_CREDENTIALS)
def lava_res = build(job: 'tf-m-lava-submit', parameters: params, propagate: false)
if (lava_res.result in failure_states) {
error("LAVA Create and Submit failed at ${lava_res.getAbsoluteUrl()}")
@@ -202,7 +204,7 @@
all_jobs = submitJobsToList(results['lava_jobs'])
if (all_jobs.size() > 0) {
dir("tf-m-ci-scripts") {
- withCredentials([usernamePassword(credentialsId: 'LAVA_CREDENTIALS', passwordVariable: 'LAVA_TOKEN', usernameVariable: 'LAVA_USER')]) {
+ withCredentials([usernamePassword(credentialsId: env.LAVA_CREDENTIALS, passwordVariable: 'LAVA_TOKEN', usernameVariable: 'LAVA_USER')]) {
output = sh(script: """./lava_helper/lava_wait_jobs.py --job-ids ${all_jobs.join(",")} \
--lava-url ${env.LAVA_URL} --lava-user ${LAVA_USER} --lava-token ${LAVA_TOKEN} \
--artifacts-path lava_artifacts --lava-timeout 7200 \
diff --git a/jenkins/lava-submit.jpl b/jenkins/lava-submit.jpl
index f247953..c9ba349 100644
--- a/jenkins/lava-submit.jpl
+++ b/jenkins/lava-submit.jpl
@@ -14,7 +14,7 @@
}
}
stage("LAVA") {
- withCredentials([usernamePassword(credentialsId: 'LAVA_CREDENTIALS', passwordVariable: 'LAVA_TOKEN', usernameVariable: 'LAVA_USER')]) {
+ withCredentials([usernamePassword(credentialsId: env.LAVA_CREDENTIALS, passwordVariable: 'LAVA_TOKEN', usernameVariable: 'LAVA_USER')]) {
print("Generating LAVA jobs...")
def bl2_string = ""
def psa_string = ""