From df9af6d9fa3e8199b5df8e51ac108f6feddbe777 Mon Sep 17 00:00:00 2001
From: Nicolas Richart <nicolas.richart@epfl.ch>
Date: Fri, 26 Jan 2024 09:54:55 +0100
Subject: [PATCH] List hashes and use them

---
 .gitlab-ci.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f2c7500..b51a3e0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -141,10 +141,12 @@ spack:install_compilers:
       --show-log-on-error
       ${COMPILER_LIST_SPECS}
 
+    - hashes=$(jq -r '.spec.nodes | map("/\(.hash)") | join(" ")' compilers_spec.json)
+
     - spack/bin/spack buildcache create
       --update-index
       --key EDC904DCE3D2E84E
-      /buildcache $( jq -r '.spec.nodes | map("/\(.hash)") | join(" ")' compilers_spec.json )
+      /buildcache ${hashes}
 
     - |
       echo 'definitions: [ compilers: [' ${COMPILER_LIST_SPECS} ']]' > compiler_definitions.yaml
-- 
GitLab