From c3eabe2f90101085c4f95b7d9efedc2ef31e8825 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Thu, 19 Sep 2024 12:41:19 +0200 Subject: [PATCH] Disable immediate exit during retries of Gitea API operations Change-Id: I05afbe1dce9ac68756099922bfe1abb7e622ea93 Signed-off-by: garciadeblas --- installers/mgmt-cluster/gitea/admin/api.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/installers/mgmt-cluster/gitea/admin/api.sh b/installers/mgmt-cluster/gitea/admin/api.sh index 2c635cc8..50b46e65 100755 --- a/installers/mgmt-cluster/gitea/admin/api.sh +++ b/installers/mgmt-cluster/gitea/admin/api.sh @@ -51,8 +51,12 @@ function gitea_api_operation() { fi } +# Disable immediate exit during retries of API operations +set +e monitor_condition gitea_api_operation "Gitea API operation did not succeed yet...\n" 120 5 RET=$? +set -e + if [[ $RET -ne 0 ]] then echo -e "\nFATAL: Gitea API operation did not succeed after several retries. ABORTED.\n" -- 2.25.1