diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 93c5bf81396228da2077e5cb7d4c6ca8742defa9..8c665fc69c9f518beb51419d05bd747e9b972cf9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -256,11 +256,9 @@ jug_dev:default:
     - version
     - base
   script:
-    ## Setup mirrors.yaml with rw mirror secrets
-    - cat mirrors.yaml.in | envsubst > mirrors.yaml
-    ## Build targets
     - source spack.sh ; 
       source eic-spack.sh ;
+      cat mirrors.yaml.in | envsubst > mirrors.yaml ;
       docker buildx build --push ${BUILD_OPTIONS}
                    --tag ${CI_REGISTRY}/${CI_PROJECT_PATH}/${BUILD_IMAGE}:${INTERNAL_TAG}
                    ${EXPORT_TAG:+