Auto merge of #58655 - kennytm:download-docker-cache-with-timeout, r=alexcrichton

Added a connection timeout and speed threshold when downloading the Docker cache

This is an attempt to fix one possible cause of #56112. Similar to #52846, this changed the download docker-cache command to fail if it cannot connect or falls below 10 bytes/s after 30 seconds, so it could be retried sooner.
This commit is contained in:
bors 2019-02-23 11:32:10 +00:00
commit bcfb5e8ac3

View File

@ -31,7 +31,7 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
echo "Attempting to download $s3url"
rm -f /tmp/rustci_docker_cache
set +e
retry curl -f -L -C - -o /tmp/rustci_docker_cache "$url"
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/')
set -e
echo "Downloaded containers:\n$loaded_images"