-
Notifications
You must be signed in to change notification settings - Fork 63
81 lines (63 loc) · 2.18 KB
/
ci.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
name: CI
on:
pull_request:
env:
GO_VERSION: 1.17
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- shell: bash
run: |
sudo apt-get install libpcap-dev
- name: Check out code
uses: actions/checkout@v3
- name: Verify spec aggregation and code generation
run: make api3-verify
- name: Check licenses
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make license-check
- name: Run verification
run: make check
- name: Build Docker image
run: make docker
lint_chart:
name: Lint Helm Chart
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: "0"
submodules: true
- name: Replace version
id: replace_version
run: find . -type f -name "values.yaml" -o -name "Chart.yaml" |
xargs sed -i -e s/latest/v1.0.0-${{ github.sha }}/g
- name: Replace wasm filter commit id and sha256
id: replace_wasm_filter_commit_id_for_kuma
run: |
WASM_COMMIT="$(git rev-parse HEAD:wasm-filters)"
WASM_SHA256="$(sha256sum wasm-filters/bin/release/http-trace-filter.wasm | cut -d' ' -f1)"
WASM_URI="https://raw.githubusercontent.com/openclarity/wasm-filters/${WASM_COMMIT}/bin/release/http-trace-filter.wasm"
sed -i -e "s/sha256:.*/sha256: \"${WASM_SHA256}\"/" plugins/kuma/charts/values.yaml
sed -i -e "s#wasmFilterURI:.*#wasmFilterURI: \"${WASM_URI}\"#" plugins/kuma/charts/values.yaml
- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.10.3
- uses: actions/[email protected]
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Add Bitnami Repository
run: helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Run chart-testing (lint)
run: ct lint --chart-dirs charts,plugins/kuma --check-version-increment=false --validate-maintainers=false