[GitHub Actions] fix wait-k8s.sh

This commit is contained in:
Corneil du Plessis
2022-11-02 22:25:59 +02:00
parent fe46094afe
commit 58e1ab97a5

View File

@@ -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 ))