diff --git a/Makefile b/Makefile index 1ee015a..afd1df7 100644 --- a/Makefile +++ b/Makefile @@ -46,4 +46,4 @@ k3d-install-tekton: export KUBECONFIG=~/.k3d/kubeconfig-${ENV_CLUSTER_NAME}.yaml; \ ./.build/kubectl create ns tekton-pipelines || true; \ ./.build/kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.44.4/release.yaml; \ - ./.build/kubectl wait --for=condition=ready pod -l app.kubernetes.io/part-of=tekton-pipelines -n tekton-pipelines + ./utils/test/wait-for-pods.sh -l app.kubernetes.io/part-of=tekton-pipelines -n tekton-pipelines diff --git a/utils/test/wait-for-pods.sh b/utils/test/wait-for-pods.sh new file mode 100755 index 0000000..9c5a646 --- /dev/null +++ b/utils/test/wait-for-pods.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +podsCreated=false +while [[ $podsCreated == "false" ]]; do + if [[ $(kubectl get pods "$@" 2>&1) != *"STATUS"* ]]; then + sleep 1 + continue + fi + break +done + +exec kubectl wait --for=condition=ready pod "$@"