From e1ea006701f99455647a007546eafe45a0cfe162 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Fri, 5 Jun 2020 12:36:09 +0200 Subject: [PATCH] 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. --- src/ci/docker/run.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh index 44504f6a938b..9bc61b56efbb 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}')