about summary refs log tree commit diff
path: root/src/ci
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2020-06-05 12:36:09 +0200
committerPietro Albini <pietro@pietroalbini.org>2020-07-03 09:34:29 +0200
commite1ea006701f99455647a007546eafe45a0cfe162 (patch)
tree9049d8c5560066ff84694a8ccb05f0cd4aedbe21 /src/ci
parent1149cf04de68f45a596c5a9479a525a2efb88214 (diff)
ci: include the architecture in the docker cache key
We're starting to include native aarch64 machines in our CI, but before
this commit the architecture wasn't included in the cache key for our
Docker images. This means there could be conflicts between images
produced on different architectures, hurting our CI times.

This commit fixes the problem by including the output of `uname -m` in
the cache key.
Diffstat (limited to 'src/ci')
-rwxr-xr-xsrc/ci/docker/run.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh
index 44504f6a938..9bc61b56efb 100755
--- a/src/ci/docker/run.sh
+++ b/src/ci/docker/run.sh
@@ -57,6 +57,10 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
       # Sort the file names and cat the content into the hash key
       sort $copied_files | xargs cat >> $hash_key
 
+      # Include the architecture in the hash key, since our Linux CI does not
+      # only run in x86_64 machines.
+      uname -m >> $hash_key
+
       docker --version >> $hash_key
       cksum=$(sha512sum $hash_key | \
         awk '{print $1}')