-
Notifications
You must be signed in to change notification settings - Fork 2
113 lines (89 loc) · 2.67 KB
/
build.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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Github Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
skip-pkg-cache: true
build:
name: go Test
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Test
run: make test
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
e2e:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 🕹️ Install kind with registry
uses: bakito/kind-with-registry-action@main
- name: 🖼️ Build image
run: ./testdata/e2e/buildImage.sh
- name: 🔐 Install cert-manager
run: ./testdata/e2e/installCertManager.sh
- name: 🔐 Install service certificate
run: ./testdata/e2e/installCertificate.sh
- name: 💉 Install Java Truststore Injection Webhook helm chart
run: |
./testdata/e2e/installChart.sh
kubectl create ns e2e-test
- name: 🖥️ Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: 🛃 Test generated trust stores
run: ./testdata/e2e/testConfigMaps.sh
helm:
name: Helm Checks
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Set up Tools
run: make semver helm-docs
- name: Lint
run: |
cp chart/README.md chart/README.md.old
make helm-lint
- name: Check chart/README.md is correctly generated with 'make docs'
run: |
# ignore version as it is updated during build
sed -i '/!\[Version\:/d' chart/README.md
sed -i '/!\[Version\:/d' chart/README.md.old
diff chart/README.md.old chart/README.md
- name: Template
run: make helm-template