diff --git a/evergreen/container_registry_login.sh b/evergreen/container_registry_login.sh index 50988d0f540..746880bccf9 100644 --- a/evergreen/container_registry_login.sh +++ b/evergreen/container_registry_login.sh @@ -4,4 +4,11 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" cd src set -oe -echo "${release_tools_container_registry_password}" | podman login --password-stdin --username ${release_tools_container_registry_username} ${release_tools_container_registry} +attempts=0 +max_attempts=4 + +while ! echo "${release_tools_container_registry_password}" | podman login --password-stdin --username ${release_tools_container_registry_username} ${release_tools_container_registry}; do + [ "$attempts" -ge "$max_attempts" ] && exit 1 + ((attempts++)) + sleep 10 +done