Skip to content

Commit 468c02f

Browse files
authored
Rollup merge of rust-lang#59420 - cuviper:ci-image-info, r=alexcrichton
[CI] record docker image info for reuse This writes an extra `dist/image-$image.txt` which contains the S3 URL of the cached image and the `sha256` digest of the docker entry point. This will be uploaded with the rest of the deployed artifacts in the Travis `after_success` script. cc rust-lang/rustup#1724 r? @alexcrichton
2 parents 413aaf3 + 9e66303 commit 468c02f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/ci/docker/run.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ ci_dir="`dirname $docker_dir`"
1212
src_dir="`dirname $ci_dir`"
1313
root_dir="`dirname $src_dir`"
1414

15+
objdir=$root_dir/obj
16+
dist=$objdir/build/dist
17+
1518
source "$ci_dir/shared.sh"
1619

1720
travis_fold start build_docker
@@ -77,6 +80,11 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
7780
else
7881
echo "Looks like docker image is the same as before, not uploading"
7982
fi
83+
# Record the container image for reuse, e.g. by rustup.rs builds
84+
info="$dist/image-$image.txt"
85+
mkdir -p "$dist"
86+
echo "$url" >"$info"
87+
echo "$digest" >>"$info"
8088
fi
8189
elif [ -f "$docker_dir/disabled/$image/Dockerfile" ]; then
8290
if [ -n "$TRAVIS_OS_NAME" ]; then
@@ -99,8 +107,6 @@ fi
99107
travis_fold end build_docker
100108
travis_time_finish
101109

102-
objdir=$root_dir/obj
103-
104110
mkdir -p $HOME/.cargo
105111
mkdir -p $objdir/tmp
106112
mkdir -p $objdir/cores

0 commit comments

Comments
 (0)