diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 871bc1f69d7e1599c42a0cdc8442995bc87eb3c7..87984f9468309de35bd544adaec8822d153187ab 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -233,6 +233,18 @@ base:
                    --build-arg BUILD_IMAGE=${BUILD_IMAGE}
                    containers/debian
 
+mirrors:
+  script:
+    - apk add envsubst
+    - |
+      source spack.sh
+      source eic-spack.sh
+      export SPACK_VERSION
+      cat mirrors.yaml.in | envsubst > mirrors.yaml
+  artifacts:
+    paths:
+      mirrors.yaml
+
 jug_dev:
   parallel:
     matrix:
@@ -261,14 +273,13 @@ jug_dev:
   stage: jug
   needs:
     - version
+    - mirrors
     - base
   script:
     - if [ "${BUILD_TYPE}" == "nightly" ] ; then IF_BUILD_NIGHTLY=1 ; fi
     - if [ "${BUILD_TYPE}" == "default" ] ; then IF_BUILD_DEFAULT=1 ; fi
     - source spack.sh ; 
       source eic-spack.sh ;
-      export SPACK_VERSION ;
-      cat mirrors.yaml.in | envsubst > mirrors.yaml ;
       docker buildx build --push ${BUILD_OPTIONS}
                    --tag ${CI_REGISTRY}/${CI_PROJECT_PATH}/${BUILD_IMAGE}${ENV}:${INTERNAL_TAG}-${BUILD_TYPE}
                    ${EXPORT_TAG:+