mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
ci-automation: Fallback also to the mirror for container download
When there is no SDK container image in the registry, the fallback looks at bincache but bincache isn't backed up and may be cleaned of old releases. While this won't be the regular case, the container image registry may be unavailable (or renamed as happened now), or people would like to rerun the image job which relies on the packages container.
This commit is contained in:
parent
b4427a99ab
commit
20643b260e
@ -212,11 +212,16 @@ function docker_image_from_buildcache() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# First try bincache then release to allow a bincache overwrite
|
||||||
local url="https://${BUILDCACHE_SERVER}/containers/${version}/${tgz}"
|
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 \
|
curl --fail --silent --show-error --location --retry-delay 1 --retry 60 \
|
||||||
--retry-connrefused --retry-max-time 60 --connect-timeout 20 \
|
--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
|
cat "${tgz}" | $PIGZ -d -c | $docker load
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user