From 2d7b05f635b7a9cf9a93a0c4af2c8d56a2ad22d3 Mon Sep 17 00:00:00 2001 From: Jan Bronicki Date: Fri, 24 Apr 2026 13:50:27 +0200 Subject: [PATCH] Improve curl command output and update fallback message for SDK tarball download Signed-off-by: Jan Bronicki --- ci-automation/ci_automation_common.sh | 11 ++++++++--- sdk_lib/sdk_container_common.sh | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ci-automation/ci_automation_common.sh b/ci-automation/ci_automation_common.sh index 80d1ac4cd0..fb38d87e5a 100644 --- a/ci-automation/ci_automation_common.sh +++ b/ci-automation/ci_automation_common.sh @@ -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 } diff --git a/sdk_lib/sdk_container_common.sh b/sdk_lib/sdk_container_common.sh index 2e02da42f7..ba500787b7 100644 --- a/sdk_lib/sdk_container_common.sh +++ b/sdk_lib/sdk_container_common.sh @@ -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