-
Notifications
You must be signed in to change notification settings - Fork 39
61 lines (49 loc) · 1.71 KB
/
helm-test.yml
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
name: Helm Test
on:
push:
tags:
- v*
branches:
- master
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Kubernetes KinD Cluster
uses: container-tools/kind-action@v2
- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./build/full/Dockerfile
push: true
tags: localhost:5000/flanksource/canary-checker:latest
cache-from: type=registry,ref=docker.io/flanksource/canary-checker
- name: Update canary-checker image in helm chart
uses: mikefarah/yq@master
with:
cmd: yq -i e '.global.imageRegistry = "kind-registry:5000"' chart/values.yaml
- name: Setup Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: v3.11.3
- name: Package helm chart
run: |
helm dependency build ./chart
helm package ./chart --version 1.0.0
- name: Install helm chart
run: "helm install canary-checker canary-checker-1.0.0.tgz -n canary-checker --create-namespace"
- name: Wait for 30 seconds
run: "kubectl rollout status deploy/canary-checker -n canary-checker --timeout 5m"
- name: Check canary-checker pods
run: "kubectl describe pods -n canary-checker"
- name: Run tests
run: ./chart/test.sh canary-checker
- name: Check logs
run: kubectl logs deploy/canary-checker -n canary-checker
if: always()