forked from dimatha/adcs-issuer
-
Notifications
You must be signed in to change notification settings - Fork 13
94 lines (74 loc) · 3.74 KB
/
helm-chart-lint-test.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Lint and Test Charts
on:
- pull_request
- workflow_dispatch
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.13.0
- name: Setup polaris
uses: fairwindsops/polaris/.github/actions/setup-polaris@master
with:
version: 9.5.0
- name: Setup Pluto
uses: FairwindsOps/pluto/github-action@master
# 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/[email protected]
with:
python-version: 3.x
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (list-changed)
continue-on-error: true
id: list-changed
run: |
changed=$(ct list-changed --config ct.yaml)
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Run chart-testing (lint)
continue-on-error: true
run: |
pwd
printenv
ct lint --config ./.github/ct/ct.yaml --lint-conf ./.github/ct/lintconf.yaml --chart-yaml-schema ./.github/ct/chart_schema.yaml --debug
- name: Create kind cluster
continue-on-error: true
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'
- run: |
echo "Install cert-manager and so on ..."
kubectl cluster-info
kubectl get nodes -v=6
helm version
helm repo add jetstack https://charts.jetstack.io --force-update
helm upgrade --install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.14.2 --set installCRDs=true --set enableCertificateOwnerRef=true
helm repo add fairwinds-stable https://charts.fairwinds.com/stable --force-update
helm upgrade --install polaris fairwinds-stable/polaris --namespace demo --create-namespace --set webhook.enable=false --set dashboard.enable=false
- name: Use polaris for checking helm chart manifests
continue-on-error: true
run: |
pwd
polaris audit --helm-chart ${GITHUB_WORKSPACE}/charts/adcs-issuer --helm-values ${GITHUB_WORKSPACE}/charts/adcs-issuer/values.yaml --format=pretty --quiet --only-show-failed-tests
- name: Use pluto for checking helm chart manifests
continue-on-error: true
run: |
pwd
helm template ${GITHUB_WORKSPACE}/charts/adcs-issuer --values ${GITHUB_WORKSPACE}/charts/adcs-issuer/values.yaml | pluto detect --target-versions k8s=v1.27.0 -v 2 -o wide -
helm template ${GITHUB_WORKSPACE}/charts/adcs-issuer --values ${GITHUB_WORKSPACE}/charts/adcs-issuer/values.yaml | pluto detect --target-versions k8s=v1.28.0 -v 2 -o wide -
helm template ${GITHUB_WORKSPACE}/charts/adcs-issuer --values ${GITHUB_WORKSPACE}/charts/adcs-issuer/values.yaml | pluto detect --target-versions k8s=v1.29.0 -v 2 -o wide -
helm template ${GITHUB_WORKSPACE}/charts/adcs-issuer --values ${GITHUB_WORKSPACE}/charts/adcs-issuer/values.yaml | pluto detect --target-versions k8s=v1.30.0 -v 2 -o wide -
helm template ${GITHUB_WORKSPACE}/charts/adcs-issuer --values ${GITHUB_WORKSPACE}/charts/adcs-issuer/values.yaml | pluto detect --target-versions k8s=v1.31.0 -v 2 -o wide -
- name: Run chart-testing (install)
continue-on-error: true
run: ct install --config ct.yaml