mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-10 22:13:27 +00:00
Rollup merge of #90122 - rusticstuff:ci_curl_max_time, r=Mark-Simulacrum
CI: make docker cache download and `docker load` time out after 10 minutes Might help to prevent timeouts we have been seeing: * https://github.com/rust-lang-ci/rust/runs/3946294286?check_suite_focus=true#step:25:23 * https://github.com/rust-lang-ci/rust/runs/3956799200?check_suite_focus=true#step:25:22 * https://github.com/rust-lang-ci/rust/runs/3962928502?check_suite_focus=true#step:25:23 * https://github.com/rust-lang-ci/rust/runs/3967892291?check_suite_focus=true * https://github.com/rust-lang-ci/rust/runs/3971202204?check_suite_focus=true If the download or loading the images into docker times out the CI will still continue and rebuild the docker image from scratch.
This commit is contained in:
commit
1ea34fb463
@ -70,8 +70,13 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
|
||||
echo "Attempting to download $url"
|
||||
rm -f /tmp/rustci_docker_cache
|
||||
set +e
|
||||
retry curl -y 30 -Y 10 --connect-timeout 30 -f -L -C - -o /tmp/rustci_docker_cache "$url"
|
||||
loaded_images=$(docker load -i /tmp/rustci_docker_cache | sed 's/.* sha/sha/')
|
||||
retry curl --max-time 600 -y 30 -Y 10 --connect-timeout 30 -f -L -C - \
|
||||
-o /tmp/rustci_docker_cache "$url"
|
||||
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/')
|
||||
set -e
|
||||
echo "Downloaded containers:\n$loaded_images"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user