about summary refs log tree commit diff
path: root/src/ci/docker
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-29 05:55:46 +0000
committerbors <bors@rust-lang.org>2023-08-29 05:55:46 +0000
commitd9c11c65ee93b6dfd0c71f17812c68d316fce183 (patch)
tree1451f2e711b883122df8c5f3f7baa19ef46a1c89 /src/ci/docker
parent63bf24090e38463bc2125170a0c3e98e0d20a85c (diff)
parentfb3565a848af21af18c26156f0acae9115257e46 (diff)
downloadrust-d9c11c65ee93b6dfd0c71f17812c68d316fce183.tar.gz
rust-d9c11c65ee93b6dfd0c71f17812c68d316fce183.zip
Auto merge of #3042 - rust-lang:rustup-2023-08-29, r=RalfJung
Automatic sync from rustc
Diffstat (limited to 'src/ci/docker')
-rwxr-xr-xsrc/ci/docker/run.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh
index 8bd8beb873b..e9c155b1378 100755
--- a/src/ci/docker/run.sh
+++ b/src/ci/docker/run.sh
@@ -64,9 +64,8 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
 
       docker --version >> $hash_key
 
-      # Include cache version. Currently it is needed to bust Docker
-      # cache key after opting in into the old Docker build backend.
-      echo "1" >> $hash_key
+      # Include cache version. Can be used to manually bust the Docker cache.
+      echo "2" >> $hash_key
 
       cksum=$(sha512sum $hash_key | \
         awk '{print $1}')
@@ -78,6 +77,10 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
       set +e
       retry curl --max-time 600 -y 30 -Y 10 --connect-timeout 30 -f -L -C - \
         -o /tmp/rustci_docker_cache "$url"
+
+      docker_archive_hash=$(sha512sum /tmp/rustci_docker_cache | awk '{print $1}')
+      echo "Downloaded archive hash: ${docker_archive_hash}"
+
       echo "Loading images into docker"
       # docker load sometimes hangs in the CI, so time out after 10 minutes with TERM,
       # KILL after 12 minutes
@@ -115,8 +118,10 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
       digest=$(docker inspect rust-ci --format '{{.Id}}')
       echo "Built container $digest"
       if ! grep -q "$digest" <(echo "$loaded_images"); then
-        echo "Uploading finished image to $url"
+        echo "Uploading finished image $digest to $url"
         set +e
+        # Print image history for easier debugging of layer SHAs
+        docker history rust-ci
         docker history -q rust-ci | \
           grep -v missing | \
           xargs docker save | \
@@ -131,6 +136,7 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
       mkdir -p "$dist"
       echo "$url" >"$info"
       echo "$digest" >>"$info"
+      cat "$info"
     fi
 elif [ -f "$docker_dir/disabled/$image/Dockerfile" ]; then
     if isCI; then