Skip to content

Commit c5a9d21

Browse files
committed
check cluster status
Signed-off-by: JeffMboya <[email protected]> check cluster status Signed-off-by: JeffMboya <[email protected]> run cluster check after creation Signed-off-by: JeffMboya <[email protected]> update kubectl version Signed-off-by: JeffMboya <[email protected]> update kubectl version Signed-off-by: JeffMboya <[email protected]> update kubectl version Signed-off-by: JeffMboya <[email protected]> update kubectl version Signed-off-by: JeffMboya <[email protected]> update chart version Signed-off-by: JeffMboya <[email protected]> update chart version Signed-off-by: JeffMboya <[email protected]> update docs Signed-off-by: JeffMboya <[email protected]>
1 parent 64882c6 commit c5a9d21

File tree

2 files changed

+32
-6
lines changed

2 files changed

+32
-6
lines changed

.github/workflows/lint-test.yaml

+29-4
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,39 @@ jobs:
4343
echo "changed=true" >> "$GITHUB_OUTPUT"
4444
fi
4545
46-
- name: Run chart-testing (lint)
46+
- name: Create kind cluster
4747
if: steps.list-changed.outputs.changed == 'true'
48+
uses: helm/[email protected]
49+
50+
- name: Set up Kubectl
51+
uses: azure/setup-kubectl@v4
52+
with:
53+
version: latest
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'
4858
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
5074
51-
- name: Create kind cluster
75+
- name: Run chart-testing (lint)
5276
if: steps.list-changed.outputs.changed == 'true'
53-
uses: helm/[email protected]
77+
run: |
78+
ct lint --target-branch ${{ github.event.repository.default_branch }} --charts charts/magistrala
5479
5580
- name: Run chart-testing (install)
5681
if: steps.list-changed.outputs.changed == 'true'

charts/magistrala/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# magistrala
22

3-
![Version: 1.0.3](https://img.shields.io/badge/Version-1.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.12.1](https://img.shields.io/badge/AppVersion-0.12.1-informational?style=flat-square)
3+
![Version: 1.0.6](https://img.shields.io/badge/Version-1.0.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.14.0](https://img.shields.io/badge/AppVersion-0.14.0-informational?style=flat-square)
44

55
Magistrala IoT Platform
66

@@ -308,4 +308,5 @@ Magistrala IoT Platform
308308
| users.passwordRegex | string | `"^.{8,}$"` | |
309309
| users.secretKey | string | `"secretKey"` | |
310310
| users.tokenResetEndpoint | string | `"/reset-request"` | |
311-
| vault.enabled | bool | `false` | |
311+
| vault.enabled | bool | `false` | |
312+

0 commit comments

Comments
 (0)