This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch release-1.3.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/release-1.3.x by this push:
new db60213 fix(ci): Use kubectl wait command to check Knative readiness
db60213 is described below
commit db6021392e461c91ec3e816d55bdd0a0b09c5b54
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 7380641..6178a48 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: |