Skip to content
Snippets Groups Projects

Disable OCI cache usage for jobs w/o install prefix "/esd"

Merged Eric Müller requested to merge fix_cineca into master
All threads resolved!
Files
2
+ 6
6
@@ -16,7 +16,7 @@ variables:
# start a k8s Job that will build the Spack environment
.deploy-build-environment:
variables:
OCI_CACHE_PREFIX: ${HARBOR_HOST}/${HARBOR_PROJECT}/${CI_COMMIT_BRANCH}
OCI_CACHE_PREFIX: ""
UPDATE_SPACK_OCI_CACHES: false
stage: build
tags:
@@ -186,7 +186,7 @@ build-spack-env-on-runner:
variables:
SPACK_DEV_ENV: ebrains-dev
SPACK_JOBS: 2
OCI_CACHE_PREFIX: ${HARBOR_HOST}/${HARBOR_PROJECT}/master
OCI_CACHE_PREFIX: ""
UPDATE_SPACK_OCI_CACHES: false
script:
# deactivate environment views (we don't need them for the test build-job)
@@ -221,15 +221,15 @@ sync-gitlab-spack-instance:
variables:
SPACK_REPO_PATH: $SPACK_PATH_GITLAB/ebrains-spack-builds
SPACK_JOBS: 4
OCI_CACHE_PREFIX: ${HARBOR_HOST}/${HARBOR_PROJECT}/${CI_COMMIT_BRANCH}
UPDATE_SPACK_OCI_CACHES: true
OCI_CACHE_PREFIX: ""
UPDATE_SPACK_OCI_CACHES: false
script:
- SPACK_NFS_ENV=${CI_COMMIT_BRANCH//./-}
# create spack dir if it doesn't exist
- mkdir -p $SPACK_PATH_GITLAB
# get latest state of EBRAINS repo
- rm -rf $SPACK_REPO_PATH && cp -r $CI_PROJECT_DIR $SPACK_REPO_PATH
# run installation script and set UPDATE to true
# run installation script
- bash install_spack_env.sh $SPACK_JOBS $SPACK_PATH_GITLAB $SPACK_REPO_PATH $SPACK_NFS_ENV "" $UPDATE_SPACK_OCI_CACHES $OCI_CACHE_PREFIX
# create kernel spec, so that the environment can be used in gitlab CI jobs
- RELEASE_NAME=$(case $CI_COMMIT_BRANCH in experimental_rel) echo ebrains-experimental;; ebrains*) echo ${CI_COMMIT_BRANCH:0:10}.${CI_COMMIT_BRANCH:11};; *) echo $CI_COMMIT_BRANCH;; esac);
@@ -247,7 +247,7 @@ sync-gitlab-spack-instance:
- spack_logs
when: always
rules:
# branches that update the gitlab-runner upstream (read-only) installation and the spack OCI caches
# branches that update the gitlab-runner upstream (read-only) installation
- if: ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == "experimental_rel" || $CI_COMMIT_BRANCH =~ /^ebrains/) && $CI_PROJECT_NAMESPACE =~ /platform\/esd/ && $CI_PIPELINE_SOURCE != "schedule"
when: manual