blob: fbb86116a486f916cf9a43efd7c84d1fc531b578 [file] [log] [blame]
#!/usr/bin/env groovy
//-------------------------------------------------------------------------------
// Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
//
// SPDX-License-Identifier: BSD-3-Clause
//
//-------------------------------------------------------------------------------
node("docker-amd64-xenial") {
stage("Init") {
cleanWs()
dir("tf-m-ci-scripts") {
git url: '$CI_SCRIPTS_REPO', branch: 'master', credentialsId: 'GIT_SSH_KEY'
}
}
stage("LAVA") {
withCredentials([usernamePassword(credentialsId: 'LAVA_CREDENTIALS', passwordVariable: 'LAVA_TOKEN', usernameVariable: 'LAVA_USER')]) {
print("Generating LAVA jobs...")
def bl2_string = ""
if (env.BL2.equals("True")) {
bl2_string = "--bl2"
}
dir("tf-m-ci-scripts") {
def res = sh(script: """./lava_helper/lava_create_jobs.py \
--build-number ${env.BUILD_NUMBER} --output-dir lava_jobs \
--compiler ${env.COMPILER} --platform ${env.TARGET_PLATFORM} \
${bl2_string} --build-type ${env.CMAKE_BUILD_TYPE} \
--jenkins-build-url ${env.BUILD_URL} --proj-config ${env.PROJ_CONFIG}
""", returnStdout: true).trim()
print(res)
job_ids = sh(script: """./lava_helper/lava_submit_jobs.py \
--lava-url https://tf.validation.linaro.org --job-dir lava_jobs \
--lava-user ${LAVA_USER} --lava-token ${LAVA_TOKEN}
""", returnStdout: true).trim()
currentBuild.setDescription(job_ids)
}
}
}
stage("Post") {
archiveArtifacts artifacts: 'tf-m-ci-scripts/lava_jobs/**', allowEmptyArchive: true
cleanWs()
}
}