-
Notifications
You must be signed in to change notification settings - Fork 168
94 lines (84 loc) · 2.98 KB
/
tests.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
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
name: Tests
# Run this workflow on pushes and manually
on: [push, workflow_dispatch]
jobs:
test:
env:
# vault-k8s version
VERSION: "0.0.0-dev"
TARBALL_FILE: vault-k8s-image.docker.tar
outputs:
version: ${{ env.VERSION }}
tarball_file: ${{ env.TARBALL_FILE }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: .go-version
- name: Build
run: |
REGISTRY=hashicorp make build image
docker save --output "${TARBALL_FILE}" hashicorp/vault-k8s:${{ env.VERSION }}
- name: Test
run: make test
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: ${{ env.TARBALL_FILE }}
path: ${{ env.TARBALL_FILE }}
versions:
runs-on: ubuntu-latest
steps:
- run: echo "setting versions"
outputs:
# JSON encoded array of k8s versions.
K8S_VERSIONS: '["1.30.0", "1.29.4", "1.28.9", "1.27.13", "1.26.15"]'
VAULT_N: "1.17.2"
VAULT_N_1: "1.16.3"
VAULT_N_2: "1.15.6"
latest-vault:
name: vault:${{ matrix.vault-version }} kind:${{ matrix.k8s-version }}
runs-on: ubuntu-latest
needs:
- test
- versions
strategy:
fail-fast: false
matrix:
vault-version:
- ${{ needs.versions.outputs.VAULT_N }}
k8s-version: ${{ fromJson(needs.versions.outputs.K8S_VERSIONS) }}
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: ./.github/actions/integration-test
name: vault:${{ matrix.vault-version }} kind:${{ matrix.k8s-version }}
with:
k8s-version: ${{ matrix.k8s-version }}
vault-version: ${{ matrix.vault-version }}
tarball-file: ${{ needs.test.outputs.tarball_file }}
version: ${{ needs.test.outputs.version }}
vault-license: ${{ secrets.VAULT_LICENSE_CI }}
latest-k8s:
name: vault:${{ matrix.vault-version }} kind:${{ matrix.k8s-version }}
needs:
- versions
- test
strategy:
fail-fast: false
matrix:
k8s-version:
- ${{ fromJson(needs.versions.outputs.K8S_VERSIONS)[0] }}
vault-version:
- ${{ needs.versions.outputs.VAULT_N_1 }}
- ${{ needs.versions.outputs.VAULT_N_2 }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: ./.github/actions/integration-test
name: vault:${{ matrix.vault-version }} kind:${{ matrix.k8s-version }}
with:
k8s-version: ${{ matrix.k8s-version }}
vault-version: ${{ matrix.vault-version }}
tarball-file: ${{ needs.test.outputs.tarball_file }}
version: ${{ needs.test.outputs.version }}
vault-license: ${{ secrets.VAULT_LICENSE_CI }}