-
Notifications
You must be signed in to change notification settings - Fork 0
456 lines (385 loc) · 15.3 KB
/
daily-nightly-jobs.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
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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
name: Daily nightly jobs
on:
schedule:
- cron: "0 0 * * *" # every day at midnight
defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}
jobs:
canary-arm64:
runs-on: [self-hosted, ubuntu-20.04-arm64, ARM64]
if: github.repository == 'rook/rook'
env:
BLOCK: /dev/sdb
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: consider debugging
uses: ./.github/workflows/tmate_debug
with:
use-tmate: ${{ secrets.USE_TMATE }}
- name: setup golang
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Install Docker
run: |
sudo apt-get update
sudo apt-get install docker.io -y
- name: Start Docker service
run: sudo service docker start
- name: Check Docker version
run: docker version
- name: setup minikube
run: |
sudo apt-get install build-essential -y
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-arm64
sudo install minikube-linux-arm64 /usr/local/bin/minikube
sudo rm -f minikube-linux-arm64
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
minikube start --memory 28g --cpus=12 --driver=docker
- name: install yq
run: |
sudo curl -JL https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_arm64 --output /usr/bin/yq
sudo chmod +x /usr/bin/yq
- name: print k8s cluster status
run: tests/scripts/github-action-helper.sh print_k8s_cluster_status
- name: use local disk and create partitions for osds
run: |
tests/scripts/github-action-helper.sh use_local_disk
tests/scripts/create-bluestore-partitions.sh --disk "$BLOCK" --osd-count 1
- name: validate-yaml
run: tests/scripts/github-action-helper.sh validate_yaml
- name: deploy cluster
run: |
# Use the official build images for the nightly arm tests instead of rebuilding
export USE_LOCAL_BUILD=false
# removing liveness probes since the env is slow and the probe is killing the daemons
yq write -d0 -i deploy/examples/cluster-test.yaml "spec.healthCheck.livenessProbe.mon.disabled" true
yq write -d0 -i deploy/examples/cluster-test.yaml "spec.healthCheck.livenessProbe.mgr.disabled" true
yq write -d0 -i deploy/examples/cluster-test.yaml "spec.healthCheck.livenessProbe.osd.disabled" true
tests/scripts/github-action-helper.sh deploy_cluster
# there are no package for arm64 nfs-ganesha
kubectl delete -f deploy/examples/nfs-test.yaml
- name: wait for prepare pod
run: timeout 900 sh -c 'until kubectl -n rook-ceph logs -f $(kubectl -n rook-ceph get pod -l app=rook-ceph-osd-prepare -o jsonpath='{.items[*].metadata.name}'); do sleep 5; done' || kubectl -n rook-ceph get all && kubectl logs -n rook-ceph deploy/rook-ceph-operator
- name: wait for ceph to be ready
run: tests/scripts/github-action-helper.sh wait_for_ceph_to_be_ready "mon,mgr,osd,mds,rgw,rbd_mirror,fs_mirror" 1
- name: teardown minikube, docker and kubectl
if: always()
run: |
uptime
minikube delete
docker system prune --all --force
sudo service docker stop
sudo rm -rf /usr/local/bin/minikube
sudo rm -rf /usr/local/bin/kubectl
- name: remove /usr/bin/yq
if: always()
run: sudo rm -rf /usr/bin/yq
- name: collect common logs
if: always()
uses: ./.github/workflows/collect-logs
with:
name: canary-arm64
- name: upload canary test result
uses: actions/upload-artifact@v4
if: always()
with:
name: canary-arm64
path: test
smoke-suite-quincy-devel:
if: github.repository == 'rook/rook'
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: consider debugging
uses: ./.github/workflows/tmate_debug
with:
use-tmate: ${{ secrets.USE_TMATE }}
- name: setup cluster resources
uses: ./.github/workflows/integration-test-config-latest-k8s
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
kubernetes-version: "1.28.4"
- name: TestCephSmokeSuite
run: |
export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION="quincy-devel" go test -v -timeout 1800s -run TestCephSmokeSuite github.com/rook/rook/tests/integration
- name: collect common logs
if: always()
run: |
export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
export CLUSTER_NAMESPACE="smoke-ns"
export OPERATOR_NAMESPACE="smoke-ns-system"
tests/scripts/collect-logs.sh
- name: Artifact
uses: actions/upload-artifact@v4
if: failure()
with:
name: ceph-smoke-suite-quincy-artifact
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
smoke-suite-reef-devel:
if: github.repository == 'rook/rook'
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: consider debugging
uses: ./.github/workflows/tmate_debug
with:
use-tmate: ${{ secrets.USE_TMATE }}
- name: setup cluster resources
uses: ./.github/workflows/integration-test-config-latest-k8s
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
kubernetes-version: "1.28.4"
- name: TestCephSmokeSuite
run: |
export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION="reef-devel" go test -v -timeout 1800s -run TestCephSmokeSuite github.com/rook/rook/tests/integration
- name: collect common logs
if: always()
run: |
export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
export CLUSTER_NAMESPACE="smoke-ns"
export OPERATOR_NAMESPACE="smoke-ns-system"
tests/scripts/collect-logs.sh
- name: Artifact
uses: actions/upload-artifact@v4
if: failure()
with:
name: ceph-smoke-suite-reef-artifact
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
smoke-suite-ceph-main:
if: github.repository == 'rook/rook'
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: consider debugging
uses: ./.github/workflows/tmate_debug
with:
use-tmate: ${{ secrets.USE_TMATE }}
- name: setup cluster resources
uses: ./.github/workflows/integration-test-config-latest-k8s
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
kubernetes-version: "1.28.4"
- name: TestCephSmokeSuite
run: |
export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION=main go test -v -timeout 1800s -run TestCephSmokeSuite github.com/rook/rook/tests/integration
- name: collect common logs
if: always()
run: |
export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
export CLUSTER_NAMESPACE="smoke-ns"
export OPERATOR_NAMESPACE="smoke-ns-system"
tests/scripts/collect-logs.sh
- name: Artifact
uses: actions/upload-artifact@v4
if: failure()
with:
name: ceph-smoke-suite-master-artifact
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
object-suite-quincy-devel:
if: github.repository == 'rook/rook'
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: consider debugging
uses: ./.github/workflows/tmate_debug
with:
use-tmate: ${{ secrets.USE_TMATE }}
- name: setup cluster resources
uses: ./.github/workflows/integration-test-config-latest-k8s
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
kubernetes-version: "1.28.4"
- name: TestCephObjectSuite
run: |
export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION="quincy-devel" go test -v -timeout 1800s -failfast -run TestCephObjectSuite github.com/rook/rook/tests/integration
- name: collect common logs
if: always()
run: |
export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
export CLUSTER_NAMESPACE="object-ns"
export OPERATOR_NAMESPACE="object-ns-system"
tests/scripts/collect-logs.sh
- name: Artifact
uses: actions/upload-artifact@v4
if: failure()
with:
name: ceph-object-suite-quincy-artifact
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
object-suite-ceph-main:
if: github.repository == 'rook/rook'
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: consider debugging
uses: ./.github/workflows/tmate_debug
with:
use-tmate: ${{ secrets.USE_TMATE }}
- name: setup cluster resources
uses: ./.github/workflows/integration-test-config-latest-k8s
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
kubernetes-version: "1.28.4"
- name: TestCephObjectSuite
run: |
export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION=main go test -v -timeout 1800s -failfast -run TestCephObjectSuite github.com/rook/rook/tests/integration
- name: collect common logs
if: always()
run: |
export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
export CLUSTER_NAMESPACE="object-ns"
export OPERATOR_NAMESPACE="object-ns-system"
tests/scripts/collect-logs.sh
- name: Artifact
uses: actions/upload-artifact@v4
if: failure()
with:
name: ceph-object-suite-master-artifact
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
upgrade-from-reef-stable-to-reef-devel:
if: github.repository == 'rook/rook'
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: consider debugging
uses: ./.github/workflows/tmate_debug
with:
use-tmate: ${{ secrets.USE_TMATE }}
- name: setup cluster resources
uses: ./.github/workflows/integration-test-config-latest-k8s
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
kubernetes-version: "1.28.4"
- name: TestCephUpgradeSuite
run: |
export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
go test -v -timeout 1800s -failfast -run TestCephUpgradeSuite/TestUpgradeCephToReefDevel github.com/rook/rook/tests/integration
- name: collect common logs
if: always()
run: |
export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
export CLUSTER_NAMESPACE="upgrade"
export OPERATOR_NAMESPACE="upgrade-system"
tests/scripts/collect-logs.sh
- name: Artifact
uses: actions/upload-artifact@v4
if: failure()
with:
name: ceph-upgrade-suite-reef-artifact
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
upgrade-from-quincy-stable-to-quincy-devel:
if: github.repository == 'rook/rook'
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: consider debugging
uses: ./.github/workflows/tmate_debug
with:
use-tmate: ${{ secrets.USE_TMATE }}
- name: setup cluster resources
uses: ./.github/workflows/integration-test-config-latest-k8s
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
kubernetes-version: "1.28.4"
- name: TestCephUpgradeSuite
run: |
export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1)
go test -v -timeout 1800s -failfast -run TestCephUpgradeSuite/TestUpgradeCephToQuincyDevel github.com/rook/rook/tests/integration
- name: collect common logs
if: always()
run: |
export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
export CLUSTER_NAMESPACE="upgrade"
export OPERATOR_NAMESPACE="upgrade-system"
tests/scripts/collect-logs.sh
- name: Artifact
uses: actions/upload-artifact@v4
if: failure()
with:
name: ceph-upgrade-suite-quincy-artifact
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
rgw-multisite-test-with-ceph-devel:
if: github.repository == 'rook/rook'
runs-on: ubuntu-20.04
strategy:
matrix:
ceph-image-tag:
["latest-main-devel", "latest-quincy-devel", "latest-reef-devel"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: consider debugging
uses: ./.github/workflows/tmate_debug
with:
use-tmate: ${{ secrets.USE_TMATE }}
- name: run RGW multisite test
uses: ./.github/workflows/rgw-multisite-test
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
ceph-image: quay.io/ceph/daemon-base:${{ matrix.ceph-image-tag }}
- name: upload test result
uses: actions/upload-artifact@v4
if: always()
with:
name: rgw-multisite-testing-ceph-${{ matrix.ceph-image-tag }}
path: test
encryption-pvc-kms-ibm-kp:
if: github.repository == 'rook/rook'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: consider debugging
uses: ./.github/workflows/tmate_debug
with:
use-tmate: ${{ secrets.USE_TMATE }}
- name: run encryption KMS IBM Key Protect
uses: ./.github/workflows/encryption-pvc-kms-ibm-kp
if: "env.IBM_KP_SERVICE_INSTANCE_ID != '' && env.IBM_KP_SERVICE_API_KEY != ''"
env:
IBM_KP_SERVICE_INSTANCE_ID: ${{ secrets.IBM_INSTANCE_ID }}
IBM_KP_SERVICE_API_KEY: ${{ secrets.IBM_SERVICE_API_KEY }}
with:
ibm-instance-id: ${{ secrets.IBM_INSTANCE_ID }}
ibm-service-api-key: ${{ secrets.IBM_SERVICE_API_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: upload test result
uses: actions/upload-artifact@v4
if: always()
with:
name: encryption-pvc-kms-ibm-kp
path: test