@@ -64,9 +64,8 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
64
64
65
65
docker --version >> $hash_key
66
66
67
- # Include cache version. Currently it is needed to bust Docker
68
- # cache key after opting in into the old Docker build backend.
69
- echo " 1" >> $hash_key
67
+ # Include cache version. Can be used to manually bust the Docker cache.
68
+ echo " 2" >> $hash_key
70
69
71
70
cksum=$( sha512sum $hash_key | \
72
71
awk ' {print $1}' )
@@ -78,6 +77,10 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
78
77
set +e
79
78
retry curl --max-time 600 -y 30 -Y 10 --connect-timeout 30 -f -L -C - \
80
79
-o /tmp/rustci_docker_cache " $url "
80
+
81
+ docker_archive_hash=$( sha512sum /tmp/rustci_docker_cache | awk ' {print $1}' )
82
+ echo " Downloaded archive hash: ${docker_archive_hash} "
83
+
81
84
echo " Loading images into docker"
82
85
# docker load sometimes hangs in the CI, so time out after 10 minutes with TERM,
83
86
# KILL after 12 minutes
@@ -115,8 +118,10 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
115
118
digest=$( docker inspect rust-ci --format ' {{.Id}}' )
116
119
echo " Built container $digest "
117
120
if ! grep -q " $digest " <( echo " $loaded_images " ) ; then
118
- echo " Uploading finished image to $url "
121
+ echo " Uploading finished image $digest to $url "
119
122
set +e
123
+ # Print image history for easier debugging of layer SHAs
124
+ docker history rust-ci
120
125
docker history -q rust-ci | \
121
126
grep -v missing | \
122
127
xargs docker save | \
@@ -131,6 +136,7 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
131
136
mkdir -p " $dist "
132
137
echo " $url " > " $info "
133
138
echo " $digest " >> " $info "
139
+ cat " $info "
134
140
fi
135
141
elif [ -f " $docker_dir /disabled/$image /Dockerfile" ]; then
136
142
if isCI; then
0 commit comments