Skip to content
Snippets Groups Projects
Commit 0207929f authored by Jakob Kaiser's avatar Jakob Kaiser
Browse files

fix: WITH_BUILD_CACHE option

enviroment variable was not updated in the Jenkisfile, i.e. the build
cache set via the parameters was always applied.

Change-Id: If5389d0e465a22a2aa6d258ed295e95bdce8e202
parent d9ae3fa4
No related branches found
No related tags found
No related merge requests found
......@@ -74,7 +74,6 @@ pipeline {
YASHCHIKI_SANDBOXES = "sandboxes"
YASHCHIKI_BUILD_CACHE_ON_FAILURE_NAME = get_build_cache_on_failure_name()
YASHCHIKI_IMAGE_NAME = "singularity_temp.img"
BUILD_CACHE_NAME = "${params.BUILD_CACHE_NAME}" // propagate parameter to environment
}
stages {
stage('Pre-build Cleanup') {
......@@ -121,11 +120,12 @@ pipeline {
// extract options from gerrit comment
boolean with_debug = false
boolean with_spack_verbose = false
String build_cache_name = "${params.BUILD_CACHE_NAME}"
if (isTriggeredByGerrit()) {
gerrit_comment = jesh(script: "echo '${GERRIT_EVENT_COMMENT_TEXT}' | base64 -d", returnStdout: true)
with_debug = gerrit_comment.contains("WITH_DEBUG")
with_spack_verbose = gerrit_comment.contains("WITH_SPACK_VERBOSE")
env.BUILD_CACHE_NAME = jesh(script: "bash bin/yashchiki_get_build_cache_name.sh", returnStdout: true)
build_cache_name = jesh(script: "bash bin/yashchiki_get_build_cache_name.sh", returnStdout: true).trim()
}
sh "python3 bin/yashchiki ${CONTAINER_STYLE} ${WORKSPACE}/spack ${YASHCHIKI_IMAGE_NAME} " +
......@@ -134,7 +134,7 @@ pipeline {
"--meta-dir=${YASHCHIKI_META_DIR} " +
"--caches-dir=${YASHCHIKI_CACHES_ROOT} " +
"--sandboxes-dir=${YASHCHIKI_SANDBOXES} " +
"--build-cache-name=${BUILD_CACHE_NAME} " +
"--build-cache-name=${build_cache_name} " +
("${CONTAINER_BUILD_TYPE}" == "stable" ? "--update-build-cache " : "") +
"--recipe-filename=${WORKSPACE}/visionary_recipe.def " +
"--build-cache-on-failure-name=${YASHCHIKI_BUILD_CACHE_ON_FAILURE_NAME} " +
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment