Improve curl command output and update fallback message for SDK tarball download

Signed-off-by: Jan Bronicki <janbronicki@gmail.com>
This commit is contained in:
Jan Bronicki 2026-04-24 13:50:27 +02:00
parent 63c4137c94
commit 2d7b05f635
No known key found for this signature in database
GPG Key ID: D54654C79E654386
2 changed files with 9 additions and 3 deletions

View File

@ -232,10 +232,15 @@ function docker_image_from_buildcache() {
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 \
local curl_progress=(--silent --show-error)
if [[ -t 2 ]]; then
curl_progress=(--progress-bar)
fi
curl --fail "${curl_progress[@]}" --location --retry-delay 1 --retry 60 \
--retry-connrefused --retry-max-time 60 --connect-timeout 20 \
--remote-name "${url}" \
|| curl --fail --silent --show-error --location --retry-delay 1 --retry 60 \
|| curl --fail "${curl_progress[@]}" --location --retry-delay 1 --retry 60 \
--retry-connrefused --retry-max-time 60 --connect-timeout 20 \
--remote-name "${url_release}"
@ -254,7 +259,7 @@ function docker_image_from_registry_or_buildcache() {
return
fi
echo "Falling back to tar ball download..." >&2
echo "Container image not found in registry, downloading SDK tarball instead (this is normal for nightly builds)..." >&2
docker_image_from_buildcache "${image}" "${version}" zst || \
docker_image_from_buildcache "${image}" "${version}" gz
}

View File

@ -303,6 +303,7 @@ function gnupg_ssh_gcloud_mount_opts() {
if [[ -e ${GOOGLE_APPLICATION_CREDENTIALS:-} ]] ; then
creds_dir=$(dirname "${GOOGLE_APPLICATION_CREDENTIALS}")
if [[ -d ${creds_dir} ]] ; then
echo "Mounting gcloud credentials from ${creds_dir} (used for artifact uploads, safe to ignore if not needed, not baked into any image)"
echo "-v $creds_dir:$creds_dir"
args_ref+=( -v "${creds_dir}:${creds_dir}" )
fi