Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: switch to old docker builder to temporary solve caching issue #114621

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ ENV CC=clang CXX=clang++
# Should also be changed in the opt-dist tool for other environments.
ENV PERF_COMMIT 8b2ac3042e1ff2c0074455a0a3618adef97156b1
RUN curl -LS -o perf.zip https://github.com/rust-lang/rustc-perf/archive/$PERF_COMMIT.zip && \
unzip perf.zip && \
unzip -q perf.zip && \
mv rustc-perf-$PERF_COMMIT rustc-perf && \
rm perf.zip

Expand Down
9 changes: 6 additions & 3 deletions src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
echo "Loading images into docker"
# docker load sometimes hangs in the CI, so time out after 10 minutes with TERM,
# KILL after 12 minutes
loaded_images=$(/usr/bin/timeout -k 720 600 docker load -i /tmp/rustci_docker_cache \
| sed 's/.* sha/sha/')
# FIXME: why can't parse output here?
loaded_images=$(docker load -i /tmp/rustci_docker_cache)
set -e
printf "Downloaded containers:\n$loaded_images\n"
fi
Expand All @@ -90,13 +90,15 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
context="$script_dir"
fi
echo "::group::Building docker image for $image"
docker images
retry docker \
build \
--rm \
--rm=false \
-t rust-ci \
-f "$dockerfile" \
"$context"
echo "::endgroup::"
docker images

if [ "$CI" != "" ]; then
s3url="s3://$SCCACHE_BUCKET/docker/$cksum"
Expand All @@ -106,6 +108,7 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
if ! grep -q "$digest" <(echo "$loaded_images"); then
echo "Uploading finished image to $url"
set +e
docker history rust-ci
docker history -q rust-ci | \
grep -v missing | \
xargs docker save | \
Expand Down
Loading