-
Notifications
You must be signed in to change notification settings - Fork 19
65 lines (50 loc) · 1.73 KB
/
test_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
name: Lint and Test Charts
on: pull_request
env:
TAG: v0.0.1
RELEASE_TAG: v0.0.1
MANIFEST_IMG: controller
CONTROLLER_IMG: controller
PULL_POLICY: Never
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.1
- uses: actions/setup-python@v4
with:
python-version: '3.9'
check-latest: true
- name: Set up chart-testing
uses: helm/[email protected]
with:
version: v3.9.0
- name: setupGo
uses: actions/setup-go@v4
with:
go-version: '=1.20.7'
- name: Build docker image
run: make docker-build
- name: Add CAPI operator chart repo
run: helm repo add capi-operator https://kubernetes-sigs.github.io/cluster-api-operator
- name: Package operator chart
run: make release-chart
- name: Run chart-testing (lint)
run: ct lint --validate-maintainers=false --charts out/charts/rancher-turtles/
- name: Create kind cluster
uses: helm/[email protected]
with:
cluster_name: kind
- name: Add local docker image
run: kind load docker-image ${{ env.MANIFEST_IMG }}:${{ env.TAG }}
- name: Run chart-testing (install)
run: helm install rancher-turtles out/charts/rancher-turtles/ -n rancher-turtles-system --create-namespace --wait --set cluster-api-operator.cluster-api.enabled=false --set cluster-api-operator.enabled=false
- name: Run chart-testing (un-install)
run: helm uninstall rancher-turtles -n rancher-turtles-system --wait