This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/master by this push:
new df7307b fix(ci): Use kubectl wait command to check Knative readiness
df7307b is described below
commit df7307bad300064c55d1d1a908e74ba785f44c3b
Author: Antonin Stefanutti <[email protected]>
AuthorDate: Mon Feb 15 16:35:19 2021 +0100
fix(ci): Use kubectl wait command to check Knative readiness
---
.github/workflows/knative.yml | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/knative.yml b/.github/workflows/knative.yml
index d443060..d5c7f1c 100644
--- a/.github/workflows/knative.yml
+++ b/.github/workflows/knative.yml
@@ -109,11 +109,14 @@ jobs:
kubectl apply --filename
https://github.com/knative/eventing-contrib/releases/download/$SOURCES_VERSION/camel.yaml
# Wait for installation completed
- while [ "$(kubectl get pod -n kourier-system --no-headers | wc -l)" ==
"0" ]; do echo "Waiting for pods to start in kourier-system"; kubectl get pod
-n kourier-system; sleep 5; done
- while [ "$(kubectl get pod -n kourier-system -o 'jsonpath={range
.items[*]}{.status.conditions[?(@.type=="Ready")].status}{"\n"}' | grep -v True
| wc -l)" != "0" ]; do echo "Waiting for all pods to be ready in
kourier-system"; kubectl get pod -n kourier-system; sleep 5; done
- while [ "$(kubectl get pod -n knative-serving -o 'jsonpath={range
.items[*]}{.status.conditions[?(@.type=="Ready")].status}{"\n"}' | grep -v True
| wc -l)" != "0" ]; do echo "Waiting for all pods to be ready in
knative-serving"; kubectl get pod -n knative-serving; sleep 5; done
- while [ "$(kubectl get pod -n knative-eventing -o 'jsonpath={range
.items[*]}{.status.conditions[?(@.type=="Ready")].status}{"\n"}' | grep -v True
| wc -l)" != "0" ]; do echo "Waiting for all pods to be ready in
knative-eventing"; kubectl get pod -n knative-eventing; sleep 5; done
- while [ "$(kubectl get pod -n knative-sources -o 'jsonpath={range
.items[*]}{.status.conditions[?(@.type=="Ready")].status}{"\n"}' | grep -v True
| wc -l)" != "0" ]; do echo "Waiting for all pods to be ready in
knative-sources"; kubectl get pod -n knative-sources; sleep 5; done
+ echo "Waiting for all pods to be ready in kourier-system"
+ kubectl wait --for=condition=Ready pod --all -n kourier-system
--timeout=60s
+ echo "Waiting for all pods to be ready in knative-serving"
+ kubectl wait --for=condition=Ready pod --all -n knative-serving
--timeout=60s
+ echo "Waiting for all pods to be ready in knative-eventing"
+ kubectl wait --for=condition=Ready pod --all -n knative-eventing
--timeout=60s
+ echo "Waiting for all pods to be ready in knative-sources"
+ kubectl wait --for=condition=Ready pod --all -n knative-sources
--timeout=60s
- name: Build Operator
run: |
@@ -229,11 +232,14 @@ jobs:
kubectl apply --filename
https://github.com/knative/eventing-contrib/releases/download/$SOURCES_VERSION/camel.yaml
# Wait for installation completed
- while [ "$(kubectl get pod -n kourier-system --no-headers | wc -l)"
== "0" ]; do echo "Waiting for pods to start in kourier-system"; kubectl get
pod -n kourier-system; sleep 5; done
- while [ "$(kubectl get pod -n kourier-system -o 'jsonpath={range
.items[*]}{.status.conditions[?(@.type=="Ready")].status}{"\n"}' | grep -v True
| wc -l)" != "0" ]; do echo "Waiting for all pods to be ready in
kourier-system"; kubectl get pod -n kourier-system; sleep 5; done
- while [ "$(kubectl get pod -n knative-serving -o 'jsonpath={range
.items[*]}{.status.conditions[?(@.type=="Ready")].status}{"\n"}' | grep -v True
| wc -l)" != "0" ]; do echo "Waiting for all pods to be ready in
knative-serving"; kubectl get pod -n knative-serving; sleep 5; done
- while [ "$(kubectl get pod -n knative-eventing -o 'jsonpath={range
.items[*]}{.status.conditions[?(@.type=="Ready")].status}{"\n"}' | grep -v True
| wc -l)" != "0" ]; do echo "Waiting for all pods to be ready in
knative-eventing"; kubectl get pod -n knative-eventing; sleep 5; done
- while [ "$(kubectl get pod -n knative-sources -o 'jsonpath={range
.items[*]}{.status.conditions[?(@.type=="Ready")].status}{"\n"}' | grep -v True
| wc -l)" != "0" ]; do echo "Waiting for all pods to be ready in
knative-sources"; kubectl get pod -n knative-sources; sleep 5; done
+ echo "Waiting for all pods to be ready in kourier-system"
+ kubectl wait --for=condition=Ready pod --all -n kourier-system
--timeout=60s
+ echo "Waiting for all pods to be ready in knative-serving"
+ kubectl wait --for=condition=Ready pod --all -n knative-serving
--timeout=60s
+ echo "Waiting for all pods to be ready in knative-eventing"
+ kubectl wait --for=condition=Ready pod --all -n knative-eventing
--timeout=60s
+ echo "Waiting for all pods to be ready in knative-sources"
+ kubectl wait --for=condition=Ready pod --all -n knative-sources
--timeout=60s
- name: Build Operator
run: |