From c8b1ab0029656d39c6185a7d2157031c2663fbe1 Mon Sep 17 00:00:00 2001 From: Leandro Mendes Date: Tue, 19 Sep 2023 14:42:11 +0200 Subject: [PATCH] fix: internal-request script should fail on IR failure This PR fixes the script to make it check if the InternalRequest has Succeeded or not and exit accordingly. Signed-off-by: Leandro Mendes --- utils/internal-request | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/internal-request b/utils/internal-request index bab20da1..647a144a 100755 --- a/utils/internal-request +++ b/utils/internal-request @@ -121,7 +121,7 @@ if [ "$SYNC" = "true" ]; then CONDITION_REASON=$(echo "$CONDITIONS" | jq -r '.[0].reason') if [ "$CONDITION_REASON" != "Running" ]; then echo "InternalRequest completed." - exit 0 + [ "${CONDITION_REASON}" == "Succeeded" ]; exit $? fi fi fi