Skip to content

Commit

Permalink
fix: improve tekton installation
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mmalina committed May 19, 2023
1 parent b3ae573 commit 3c1c994
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/tekton_task_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3c1c994

Please sign in to comment.