Skip to content

Commit 682766f

Browse files
authored
adding a possible fix from cnpgs own ci steps
1 parent d0d7c47 commit 682766f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/ci-helm-lint-test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,21 @@ jobs:
116116
#helm install cnpg-cluster cnpg-cluster/cnpg-cluster --values test-values.yaml
117117
helm template . -f test-values.yaml > deploy.yaml
118118
kubectl apply -f deploy.yaml
119+
120+
ITER=0
121+
while true; do
122+
if [[ $ITER -ge 300 ]]; then
123+
echo "Cluster not ready"
124+
exit 1
125+
fi
126+
READY_INSTANCES=$(kubectl get cluster cluster-example -o jsonpath='{.status.readyInstances}')
127+
if [[ "$READY_INSTANCES" == 3 ]]; then
128+
echo "Cluster up and running"
129+
break
130+
fi
131+
sleep 1
132+
(( ++ITER ))
133+
done
119134
120135
- name: Run chart-testing (install)
121136
id: install

0 commit comments

Comments
 (0)