-
Notifications
You must be signed in to change notification settings - Fork 1
293 lines (239 loc) · 8.02 KB
/
Copy pathe2e.yaml
File metadata and controls
293 lines (239 loc) · 8.02 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
name: E2E
on:
pull_request:
branches: [main, ssh]
push:
branches: [main, ssh]
workflow_dispatch:
permissions:
contents: read
jobs:
# Subprocess provider suites: hub with embedded kcp + provider binaries as
# host processes, driven over HTTP + kcp dynamic clients. No kind, no Helm,
# no Docker — the cheapest full-kcp coverage we have. The two suites share
# the embedded kcp's fixed etcd port (2380), so they run sequentially in
# one job rather than as a matrix.
e2e-providers:
name: Provider suites (embedded kcp subprocesses)
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: v1.26.1
- name: Run quickstart provider e2e
run: make e2e-provider
- name: Run infrastructure provider e2e
run: make e2e-infra-provider
e2e-standalone:
name: Standalone (embedded kcp + static token)
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: v1.26.1
- name: Install kind
uses: helm/kind-action@v1
with:
install_only: true
- name: Install Helm
uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Add kedge.localhost to /etc/hosts
run: echo "127.0.0.1 kedge.localhost" | sudo tee -a /etc/hosts
- name: Build binaries
run: make build
- name: Add bin/ to PATH
run: echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Build hub Docker image
run: docker build -f deploy/Dockerfile.hub -t ghcr.io/faroshq/kedge-hub:test .
- name: Build agent Docker image
run: docker build -f deploy/Dockerfile.agent -t ghcr.io/faroshq/kedge-agent:test .
- name: Run standalone e2e
env:
KEDGE_HUB_IMAGE: ghcr.io/faroshq/kedge-hub
KEDGE_HUB_IMAGE_PULL_POLICY: Never
KEDGE_HUB_IMAGE_TAG: test
KEDGE_AGENT_IMAGE: ghcr.io/faroshq/kedge-agent
KEDGE_AGENT_IMAGE_TAG: test
KEDGE_AGENT_IMAGE_PULL_POLICY: Never
run: make e2e-standalone E2E_TIMEOUT=50m E2E_FLAGS="-ssh-keepalive-duration=30s -keep-clusters"
- name: Collect kind cluster logs
if: failure()
run: |
mkdir -p /tmp/kind-logs
for cluster in $(kind get clusters 2>/dev/null); do
kind export logs /tmp/kind-logs/$cluster --name "$cluster" || true
done
- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-standalone-logs
path: |
*.kubeconfig
*.log
/tmp/kind-logs/
retention-days: 3
e2e-ssh:
name: SSH Server-Mode (hub-only cluster)
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: v1.26.1
- name: Install kind
uses: helm/kind-action@v1
with:
install_only: true
- name: Install Helm
uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Add kedge.localhost to /etc/hosts
run: echo "127.0.0.1 kedge.localhost" | sudo tee -a /etc/hosts
- name: Build binaries
run: make build
- name: Add bin/ to PATH
run: echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Build hub Docker image
run: docker build -f deploy/Dockerfile.hub -t ghcr.io/faroshq/kedge-hub:test .
- name: Run SSH e2e
env:
KEDGE_HUB_IMAGE: ghcr.io/faroshq/kedge-hub
KEDGE_HUB_IMAGE_PULL_POLICY: Never
KEDGE_HUB_IMAGE_TAG: test
run: make e2e-ssh E2E_TIMEOUT=30m E2E_FLAGS="-keep-clusters"
- name: Collect kind cluster logs
if: failure()
run: |
mkdir -p /tmp/kind-logs
for cluster in $(kind get clusters 2>/dev/null); do
kind export logs /tmp/kind-logs/$cluster --name "$cluster" || true
done
- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-ssh-logs
path: |
*.kubeconfig
*.log
/tmp/kind-logs/
retention-days: 3
e2e-oidc:
name: OIDC (Dex + auth-code flow)
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: v1.26.1
- name: Install kind
uses: helm/kind-action@v1
with:
install_only: true
- name: Install Helm
uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Add kedge.localhost to /etc/hosts
run: echo "127.0.0.1 kedge.localhost" | sudo tee -a /etc/hosts
- name: Add Dex hostname to /etc/hosts
run: echo "127.0.0.1 dex.kedge-system.svc.cluster.local" | sudo tee -a /etc/hosts
- name: Add dexidp Helm repo
run: |
helm repo add dexidp https://charts.dexidp.io
helm repo update dexidp
- name: Build binaries
run: make build
- name: Add bin/ to PATH
run: echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Build hub Docker image
run: |
docker build -f deploy/Dockerfile.hub \
-t ghcr.io/faroshq/kedge-hub:test .
- name: Run OIDC e2e
env:
KEDGE_HUB_IMAGE: ghcr.io/faroshq/kedge-hub
KEDGE_HUB_IMAGE_PULL_POLICY: Never
KEDGE_HUB_IMAGE_TAG: test
run: make e2e-oidc E2E_TIMEOUT=35m E2E_FLAGS="-keep-clusters"
- name: Collect kind cluster logs
if: failure()
run: |
mkdir -p /tmp/kind-logs
for cluster in $(kind get clusters 2>/dev/null); do
kind export logs /tmp/kind-logs/$cluster --name "$cluster" || true
done
- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-oidc-logs
path: |
*.kubeconfig
*.log
/tmp/kind-logs/
retention-days: 3
e2e-external-kcp:
name: External KCP (kcp via Helm + static token)
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: v1.26.1
- name: Install kind
uses: helm/kind-action@v1
with:
install_only: true
- name: Install Helm
uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Add kedge.localhost to /etc/hosts
run: echo "127.0.0.1 kedge.localhost" | sudo tee -a /etc/hosts
- name: Add kcp Helm repo
run: |
helm repo add kcp-dev https://kcp-dev.github.io/helm-charts
helm repo update kcp-dev
- name: Build binaries
run: make build
- name: Add bin/ to PATH
run: echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Build hub Docker image
run: |
docker build -f deploy/Dockerfile.hub \
-t ghcr.io/faroshq/kedge-hub:test .
- name: Run external KCP e2e
env:
KEDGE_HUB_IMAGE: ghcr.io/faroshq/kedge-hub
KEDGE_HUB_IMAGE_PULL_POLICY: Never
KEDGE_HUB_IMAGE_TAG: test
run: make e2e-external-kcp E2E_TIMEOUT=70m E2E_FLAGS="-keep-clusters"
- name: Collect kind cluster logs
if: failure()
run: |
mkdir -p /tmp/kind-logs
for cluster in $(kind get clusters 2>/dev/null); do
kind export logs /tmp/kind-logs/$cluster --name "$cluster" || true
done
- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-external-kcp-logs
path: |
*.kubeconfig
*.log
/tmp/kind-logs/
retention-days: 3