From 2f148712c7de52ba27749ad2ceab5f93d9bc4679 Mon Sep 17 00:00:00 2001 From: Zoran Regvart Date: Tue, 21 Dec 2021 14:34:08 +0100 Subject: [PATCH] chore: release of staging at end, retry 10 times (cherry picked from commit 361cba24340ebe3ce3f199b6c873c5eff18b3727) --- tools/bin/commands/release | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/bin/commands/release b/tools/bin/commands/release index 33e923020c3..776e0541753 100644 --- a/tools/bin/commands/release +++ b/tools/bin/commands/release @@ -144,9 +144,6 @@ release::run() { push_container_images "$release_version" latest fi - # Release staging repo - release_staging_repo "$topdir" "$maven_opts" - # Prepare binaries for release prepare_binaries "${topdir}/install/operator/dist" "${topdir}/install/operator/releases" @@ -165,6 +162,16 @@ release::run() { # if check_for_command gren; then # gren release --data-source=commits --tags=$release_version --override # fi + + # Release staging repo + set +e + local tries=1 + while ! release_staging_repo "$topdir" "$maven_opts"; do + if (( ((tries++)) == 10)); then + echo "ERROR: Exausted 10 tries of trying to release the staging repository" + exit 1 + fi + done } create_moving_tag_release() {