Skip to content

Commit be38729

Browse files
feat(cicd): test install and upgrade of charts (#157)
* feat(cicd): test install and upgrade of charts * feat(cicd): test install and upgrade of charts * feat(cicd): compiling and not building
1 parent 799ad7b commit be38729

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

.github/workflows/push_pr.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
name: Helm chart Lint
3737
runs-on: ubuntu-latest
3838
timeout-minutes: 10
39+
strategy:
40+
matrix:
41+
kubernetes-version: [ "v1.16.15", "v1.22.0" ]
3942
steps:
4043
- uses: actions/checkout@v2
4144
with:
@@ -63,6 +66,31 @@ jobs:
6366
echo "No unit tests found for $chart"
6467
fi
6568
done
69+
- name: Setup Minikube
70+
uses: manusa/actions-setup-minikube@v2.4.3
71+
if: steps.list-changed.outputs.changed == 'true'
72+
with:
73+
minikube version: v1.20.0
74+
kubernetes version: ${{ matrix.kubernetes-version }}
75+
github token: ${{ secrets.GITHUB_TOKEN }}
76+
- uses: actions/setup-go@v2
77+
if: steps.list-changed.outputs.changed == 'true'
78+
with:
79+
go-version: '1.17'
80+
- name: Create image for chart testing
81+
if: steps.list-changed.outputs.changed == 'true'
82+
run: |
83+
GOOS=linux GOARCH=amd64 make compile # Set GOOS and GOARCH explicitly since Dockerfile expects them in the binary name
84+
DOCKER_BUILDKIT=1 docker build -t e2e/metadata-injection:test .
85+
minikube image load e2e/metadata-injection:test
86+
kubectl create ns ct
87+
- name: Test install charts
88+
if: steps.list-changed.outputs.changed == 'true'
89+
run: ct install --namespace ct --config .github/ct.yaml --debug
90+
- name: Test upgrade charts
91+
if: steps.list-changed.outputs.changed == 'true'
92+
run: ct install --namespace ct --config .github/ct.yaml --debug --upgrade
93+
6694

6795
test:
6896
name: Unit tests

charts/nri-metadata-injection/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
description: A Helm chart to deploy the New Relic metadata injection webhook.
33
name: nri-metadata-injection
4-
version: 2.2.0
4+
version: 2.2.1
55
appVersion: 1.7.0
66
home: https://hub.docker.com/r/newrelic/k8s-metadata-injection
77
sources:
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
cluster: test-cluster
2+
3+
image:
4+
repository: e2e/metadata-injection
5+
tag: test # Defaults to AppVersion

0 commit comments

Comments
 (0)