-
Notifications
You must be signed in to change notification settings - Fork 258
140 lines (119 loc) · 3.46 KB
/
Copy pathtest-proxy.yml
File metadata and controls
140 lines (119 loc) · 3.46 KB
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Test Registry Proxy
on:
pull_request:
paths-ignore:
- "**.md"
- "**.jpg"
- "**.png"
- "**.gif"
- "**.svg"
- "adr/**"
- "docs/**"
- "CODEOWNERS"
merge_group:
paths-ignore:
- "**.md"
- "**.jpg"
- "**.png"
- "**.gif"
- "**.svg"
- "adr/**"
- "docs/**"
- "CODEOWNERS"
permissions:
contents: read
# Abort prior jobs in the same workflow / PR
concurrency:
group: proxy-${{ github.ref }}
cancel-in-progress: true
jobs:
# Build the binary and init package
build-zarf:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup golang
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- name: Build binary and zarf packages
uses: ./.github/actions/packages
# Upload the contents of the build directory for later stages to use
- name: Upload build artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: build-artifacts
path: build/
retention-days: 1
validate-proxy-kind:
runs-on: ubuntu-latest
needs: build-zarf
strategy:
fail-fast: false
matrix:
ipfamily: [ipv4, ipv6]
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Download build artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-artifacts
path: build/
- name: setup kind config
run: |
cat <<EOF > kind-nftables-config.yml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
kubeProxyMode: "nftables"
ipFamily: ${{ matrix.ipfamily }}
nodes:
- role: control-plane
- role: worker
EOF
- name: Setup Kind
run: |
kind delete cluster && kind create cluster --config=kind-nftables-config.yml
- name: Setup golang
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- name: Make Zarf executable
run: |
chmod +x build/zarf
- name: Run proxy tests
run: |
make test-proxy
env:
NODEPORT_INCOMPATIBLE: "true"
- name: get cluster info
uses: ./.github/actions/debug-cluster
if: failure()
validate-proxy-k3d:
runs-on: ubuntu-latest
needs: build-zarf
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Download build artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-artifacts
path: build/
- name: Setup K3d
uses: ./.github/actions/k3d
- name: Setup golang
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- name: Make Zarf executable
run: |
chmod +x build/zarf
- name: Run proxy tests
run: |
make test-proxy
- name: get cluster info
uses: ./.github/actions/debug-cluster
if: failure()