-
Notifications
You must be signed in to change notification settings - Fork 15
71 lines (60 loc) · 2.15 KB
/
lint-chart.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# validate any chart changes under charts directory
name: Chart Lint
env:
HELM_VERSION: v3.8.1
KIND_VERSION: v0.14.0
KIND_NODE_IMAGE: kindest/node:v1.23.4
K8S_VERSION: v1.23.4
DEFAULT_BRANCH: main
on:
push:
pull_request:
paths:
- "charts/**"
jobs:
chart-lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: ${{ env.HELM_VERSION }}
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and
# yamllint (https://github.com/adrienverge/yamllint) which require Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
architecture: x64
- name: Set up chart-testing
uses: helm/[email protected]
with:
version: v3.6.0
- name: Add dependency chart repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Run chart-testing (list-changed)
id: list-changed
run: |
# https://github.com/helm/chart-testing-action/issues/25
# if the default branch is not master , the CLI exits with error
changed=$( ct list-changed --target-branch ${{ env.DEFAULT_BRANCH }} )
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --debug --target-branch=${{ env.DEFAULT_BRANCH }} --check-version-increment=false
- name: Create kind cluster
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'
with:
wait: 120s
version: ${{ env.KIND_VERSION }}
node_image: ${{ env.KIND_NODE_IMAGE }}
kubectl_version: ${{ env.K8S_VERSION }}
- name: Run chart-testing (install)
run: ct install --debug --target-branch ${{ env.DEFAULT_BRANCH }} --helm-extra-args "--timeout 400s" --helm-extra-set-args "--set persistenceMatchNode=None --set installCRDs=true"