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.
上级 1149cf04
......@@ -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}')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册