mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
Merge pull request #3964 from flatcar/john15321/update-sdk-scripts-to-have-better-msgs
Improve SDK container setup messages for new users
This commit is contained in:
commit
8c571a62be
@ -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
|
||||
}
|
||||
|
||||
@ -308,6 +308,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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user