Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions ci-automation/ci_automation_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand All @@ -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
}
Expand Down
1 change: 1 addition & 0 deletions sdk_lib/sdk_container_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Comment thread
chewi marked this conversation as resolved.
echo "-v $creds_dir:$creds_dir"
args_ref+=( -v "${creds_dir}:${creds_dir}" )
fi
Expand Down
Loading