Commit 9a1ee65 1 parent 64882c6 commit 9a1ee65 Copy full SHA for 9a1ee65
File tree 1 file changed +29
-4
lines changed
1 file changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -43,14 +43,39 @@ jobs:
43
43
echo "changed=true" >> "$GITHUB_OUTPUT"
44
44
fi
45
45
46
- - name : Run chart-testing (lint)
46
+ - name : Create kind cluster
47
47
if : steps.list-changed.outputs.changed == 'true'
48
+
49
+
50
+ - name : Set up Kubectl
51
+ uses : azure/setup-kubectl@v1
52
+ with :
53
+ version : v4.0.0
54
+ id : install_kubectl
55
+
56
+ - name : Check if Kubernetes cluster is running
57
+ if : steps.list-changed.outputs.changed == 'true' && steps.install_kubectl.outcome == 'success'
48
58
run : |
49
- ct lint --target-branch ${{ github.event.repository.default_branch }} --charts charts/magistrala
59
+ retries=10
60
+ while [ $retries -gt 0 ]; do
61
+ if kubectl get all; then
62
+ echo "Kubernetes cluster is running."
63
+ break
64
+ else
65
+ echo "Kubernetes cluster not ready, retrying in 30 seconds..."
66
+ retries=$((retries-1))
67
+ sleep 30
68
+ fi
69
+ done
70
+ if [ $retries -eq 0 ]; then
71
+ echo "Cluster did not become ready after multiple attempts."
72
+ exit 1
73
+ fi
50
74
51
- - name : Create kind cluster
75
+ - name : Run chart-testing (lint)
52
76
if : steps.list-changed.outputs.changed == 'true'
53
-
77
+ run : |
78
+ ct lint --target-branch ${{ github.event.repository.default_branch }} --charts charts/magistrala
54
79
55
80
- name : Run chart-testing (install)
56
81
if : steps.list-changed.outputs.changed == 'true'
You can’t perform that action at this time.
0 commit comments