From 3c1c994c202e529fc6dc336bd327bc3d5b904f65 Mon Sep 17 00:00:00 2001 From: Martin Malina Date: Fri, 19 May 2023 10:12:17 +0200 Subject: [PATCH] fix: improve tekton installation The mechanism for waiting for tekton pods didn't work properly. Now we first wait for the pods to appear and then we wait for them to be ready. Signed-off-by: Martin Malina --- .github/workflows/tekton_task_tests.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tekton_task_tests.yaml b/.github/workflows/tekton_task_tests.yaml index d1c786f7a..2aa26c620 100644 --- a/.github/workflows/tekton_task_tests.yaml +++ b/.github/workflows/tekton_task_tests.yaml @@ -16,14 +16,21 @@ jobs: - name: Install Tekton run: | kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml - sleep 1 - # Wait up to 5 minutes for all the Tekton pods to be Ready - timeout 300 bash << EOF - while kubectl get pods --namespace tekton-pipelines -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}' | grep False > /dev/null + + echo -n Waiting for Tekton pods to appear.. + while [ $(kubectl get pods --namespace tekton-pipelines -o name | wc -l) -lt 2 ] do sleep 1 + echo -n . done - EOF + echo " done" + + echo Waiting for Tekton pods to be ready + for POD in $(kubectl get pods --namespace tekton-pipelines -o name) + do + kubectl wait --for=condition=Ready $POD --namespace tekton-pipelines + done + kubectl get pods --namespace tekton-pipelines - name: Checkout code uses: actions/checkout@v3