From f5ff63e68df5da43b369d9c00f2a8a7552dd6007 Mon Sep 17 00:00:00 2001 From: Zack Galbreath Date: Thu, 13 Mar 2025 07:04:46 -0400 Subject: [PATCH] ci: use stack-specific local mirrors (#49449) This should help resolve the "No binary found when cache-only was specified" errors we've recently seen in our GitLab CI pipelines. example failing job here: https://gitlab.spack.io/spack/spack/-/jobs/15570931#L370 This error is caused when a generate job finds a spec in the local root binary mirror, and that spec does not yet exist in the stack-specific mirror. The fix here is to instead locally cache the stack-specific mirrors and only use the root-level mirror for public use. --- share/spack/gitlab/cloud_pipelines/configs/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml index fde9aad3268..3e81461e48d 100644 --- a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml +++ b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml @@ -20,7 +20,7 @@ ci: - k=$CI_GPG_KEY_ROOT/intermediate_ci_signing_key.gpg; [[ -r $k ]] && spack gpg trust $k - k=$CI_GPG_KEY_ROOT/spack_public_key.gpg; [[ -r $k ]] && spack gpg trust $k script:: - - - if [ -n "$SPACK_EXTRA_MIRROR" ]; then spack mirror add local "$SPACK_EXTRA_MIRROR"; fi + - - if [ -n "$SPACK_EXTRA_MIRROR" ]; then spack mirror add local "${SPACK_EXTRA_MIRROR}/${SPACK_CI_STACK_NAME}"; fi - spack config blame mirrors - - spack --color=always --backtrace ci rebuild -j ${SPACK_BUILD_JOBS} --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2) after_script: