From ec2c09f09bc8f93984cc3db437713bab62eb1466 Mon Sep 17 00:00:00 2001 From: Bartosz Fenski Date: Fri, 28 Jun 2024 09:45:36 +0200 Subject: [PATCH] dont wait forever --- .github/workflows/test.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9b3baea..c254d7f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -66,9 +66,12 @@ jobs: - name: Check state of test objects again run: | - while [[ $(kubectl get pvc pvc-1 -o 'jsonpath={..status.phase}') != "Bound" ]]; do echo "waiting for pvc-1 status" && sleep 1; done - while [[ $(kubectl get pvc pvc-2 -o 'jsonpath={..status.phase}') != "Bound" ]]; do echo "waiting for pvc-2 status" && sleep 1; done - while [[ $(kubectl get pod pod-1 -o 'jsonpath={.status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do echo "waiting for pod-1 status" && sleep 1; done + end=$((SECONDS+60)); while [[ $(kubectl get pvc pvc-1 -o 'jsonpath={..status.phase}') != "Bound" && SECONDS -lt $end ]]; do echo "waiting for pvc-1 status" && sleep 1; done + end=$((SECONDS+60)); while [[ $(kubectl get pvc pvc-2 -o 'jsonpath={..status.phase}') != "Bound" && SECONDS -lt $end ]]; do echo "waiting for pvc-2 status" && sleep 1; done + end=$((SECONDS+60)); while [[ $(kubectl get pod pod-1 -o 'jsonpath={.status.conditions[?(@.type=="Ready")].status}') != "True" && SECONDS -lt $end ]]; do echo "waiting for pod-1 status" && sleep 1; done + kubectl describe pvc-1 + kubectl describe pvc-2 + kubectl describe pod-1 - name: Run tests run: |