From 58e1ab97a580bb575fde6b549cbfddd4c94f388f Mon Sep 17 00:00:00 2001 From: Corneil du Plessis Date: Wed, 2 Nov 2022 22:25:59 +0200 Subject: [PATCH] [GitHub Actions] fix wait-k8s.sh --- scripts/wait-k8s.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/wait-k8s.sh b/scripts/wait-k8s.sh index a65a2663..4c981fe6 100755 --- a/scripts/wait-k8s.sh +++ b/scripts/wait-k8s.sh @@ -7,9 +7,9 @@ shift # shellcheck disable=SC2086 CONDITION=$(kubectl wait $* 2> $ERR_FILE) COUNT=$(echo "$CONDITION" | grep -c -F "condition met") -if [ $COUNT -gt 0 ]; then +if ((COUNT > 0)); then echo "Condition met $COUNT times" - exit 1 + exit 0 fi RC=$? while [ "$RC" != "0" ]; do @@ -19,9 +19,9 @@ while [ "$RC" != "0" ]; do rm -f "$ERR_FILE" fi kubectl wait $* 2> "$ERR_FILE" - if [ $COUNT -gt 0 ]; then + if ((COUNT > 0)); then echo "Condition met $COUNT times" - exit 1 + exit 0 fi RC=$? RETRIES=$(( RETRIES - 1 ))