Merge pull request #513 from flatcar/kai/container-fallback

ci-automation: Fallback also to the mirror for container download
This commit is contained in:
Kai Lüke 2022-09-27 17:49:53 +02:00 committed by GitHub
commit dca21df916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,11 +212,16 @@ function docker_image_from_buildcache() {
return
fi
# First try bincache then release to allow a bincache overwrite
local url="https://${BUILDCACHE_SERVER}/containers/${version}/${tgz}"
local url_release="https://mirror.release.flatcar-linux.net/containers/${version}/${tgz}"
curl --fail --silent --show-error --location --retry-delay 1 --retry 60 \
--retry-connrefused --retry-max-time 60 --connect-timeout 20 \
--remote-name "${url}"
--remote-name "${url}" \
|| curl --fail --silent --show-error --location --retry-delay 1 --retry 60 \
--retry-connrefused --retry-max-time 60 --connect-timeout 20 \
--remote-name "${url_release}"
cat "${tgz}" | $PIGZ -d -c | $docker load