Skip to content

Commit 0d0da97

Browse files
authored
Adding a CI action to validate helm chart renderings (#199)
<!--- Note to EXTERNAL Contributors --> <!-- Thanks for opening a PR! If it is a significant code change, please **make sure there is an open issue** for this. We work best with you when we have accepted the idea first before you code. --> <!--- For ALL Contributors 👇 --> ## What was changed - WISOTT - I have added some very basic "helm lint and helm template" validation checks in this PR. One could very well build on this by adding something like "is the image that is being pulled a valid docker image". I decided to keep it small and just get this in, for now, so that we have a pipeline to test things against. ## Why? - to detect failures quite early ## Checklist <!--- add/delete as needed ---> 1. Closes <!-- add issue number here --> #191 3. How was this tested: <!--- Please describe how you tested your changes/how we can test them --> 4. Any docs updates needed? <!--- update README if applicable or point out where to update docs.temporal.io -->
1 parent 9e5a646 commit 0d0da97

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Helm Chart Validation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
helm-lint:
13+
name: Lint Helm Chart
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install Helm
19+
uses: azure/setup-helm@v3
20+
21+
- name: Lint chart
22+
run: helm lint --strict helm/temporal-worker-controller
23+
24+
helm-template:
25+
name: Template Helm Chart
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Install Helm
31+
uses: azure/setup-helm@v3
32+
33+
- name: Template with default values
34+
run: helm template test-release helm/temporal-worker-controller
35+
36+
- name: Template with namespace creation
37+
run: |
38+
helm template test-release helm/temporal-worker-controller \
39+
--set namespace.create=true
40+
41+
- name: Template with auth proxy disabled
42+
run: |
43+
helm template test-release helm/temporal-worker-controller \
44+
--set authProxy.enabled=false \
45+
--set metrics.disableAuth=true
46+
47+
helm-validate-succeed:
48+
name: All Helm Validations Succeed
49+
needs:
50+
- helm-lint
51+
- helm-template
52+
runs-on: ubuntu-latest
53+
if: always()
54+
env:
55+
RESULTS: ${{ toJSON(needs.*.result) }}
56+
steps:
57+
- name: Check results
58+
run: |
59+
if [[ -n $(echo "$RESULTS" | jq '.[] | select (. != "success")') ]]; then
60+
exit 1
61+
fi

0 commit comments

Comments
 (0)