forked from mongodb/mongodb-kubernetes-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.evergreen.yml
426 lines (376 loc) · 10.9 KB
/
.evergreen.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
ignore:
- "*.md"
functions:
setup_virtualenv:
- command: subprocess.exec
type: setup
params:
working_dir: mongodb-kubernetes-operator
binary: scripts/ci/setup_virtualenv.sh
clone:
- command: subprocess.exec
type: setup
params:
command: "mkdir -p mongodb-kubernetes-operator"
- command: git.get_project
type: setup
params:
directory: mongodb-kubernetes-operator
go_test:
- command: subprocess.exec
type: test
params:
include_expansions_in_env:
- version_id
working_dir: mongodb-kubernetes-operator
binary: scripts/ci/run_unit_tests.sh
setup_operator_sdk:
- command: subprocess.exec
type: setup
params:
working_dir: mongodb-kubernetes-operator/scripts/ci
command: go run download.go
env:
URL: https://github.com/operator-framework/operator-sdk/releases/download/v0.18.2/operator-sdk-v0.18.2-x86_64-linux-gnu
FILENAME: operator-sdk
DIR: ${workdir}/bin
# upload_e2e_logs has the responsibility of dumping as much information as
# possible into the S3 bucket
upload_e2e_logs:
- command: s3.put
params:
aws_key: ${community_aws_access_key_id}
aws_secret: ${community_aws_secret_access_key}
local_files_include_filter_prefix: mongodb-kubernetes-operator/logs/
local_files_include_filter:
- e2e/*.txt
- e2e/*.log
- e2e/*.json
region: us-east-1
remote_file: logs/${task_id}/${execution}/
bucket: community-operator-e2e-logs
permissions: public-read
content_type: text/plain
# This is a blocker for the release process. It will *always* fail and needs to be overriden
# if the release needs to proceed.
release_blocker:
- command: subprocess.exec
type: setup
params:
working_dir: mongodb-kubernetes-operator
binary: scripts/ci/release_blocker
setup_kubernetes_environment:
- command: subprocess.exec
type: setup
params:
working_dir: mongodb-kubernetes-operator/scripts/ci
command: go run download.go
env:
URL: https://storage.googleapis.com/kubernetes-release/release/v1.15.4/bin/linux/amd64/kubectl
FILENAME: kubectl
DIR: ${workdir}/bin
- command: subprocess.exec
type: setup
params:
working_dir: mongodb-kubernetes-operator/scripts/ci
command: go run download.go
env:
URL: https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-linux-amd64
FILENAME: kind
DIR: ${workdir}/bin
create_kind_cluster:
- command: subprocess.exec
type: setup
params:
add_to_path:
- ${workdir}/bin
working_dir: mongodb-kubernetes-operator
binary: scripts/ci/create_kind_cluster.sh
env:
KUBECONFIG: ${workdir}/kube_config
black_formatting_test:
- command: subprocess.exec
type: test
params:
working_dir: mongodb-kubernetes-operator
binary: scripts/ci/run_black_formatting_check.sh
run_e2e_test:
- command: subprocess.exec
type: test
params:
working_dir: mongodb-kubernetes-operator
env:
KUBECONFIG: ${workdir}/kube_config
include_expansions_in_env:
- version_id
- test
binary: scripts/ci/run_test.sh
mypy_linting_test:
- command: subprocess.exec
type: test
params:
working_dir: mongodb-kubernetes-operator
binary: scripts/ci/run_mypy_check.sh
build_and_push_image:
- command: subprocess.exec
type: setup
params:
include_expansions_in_env:
- version_id
- quay_user_name
- quay_password
- image
- image_type
- expire_after
working_dir: mongodb-kubernetes-operator
binary: scripts/ci/build_and_push_image.sh
release_docker_image:
- command: subprocess.exec
type: system
params:
working_dir: mongodb-kubernetes-operator
include_expansions_in_env:
- version_id
- quay_user_name
- quay_password
- old_image
- new_image
- image_type
command: scripts/ci/run_image_release.sh
task_groups:
- name: e2e_test_group
max_hosts: 4
setup_group:
- func: clone
- func: setup_virtualenv
- func: setup_kubernetes_environment
setup_task:
- func: create_kind_cluster
tasks:
- e2e_test_replica_set
- e2e_test_replica_set_readiness_probe
- e2e_test_replica_set_scale
- e2e_test_replica_set_scale_down
- e2e_test_replica_set_change_version
- e2e_test_feature_compatibility_version
- e2e_test_feature_compatibility_version_upgrade
- e2e_test_replica_set_multiple
- e2e_test_replica_set_tls
- e2e_test_replica_set_tls_upgrade
- e2e_test_replica_set_tls_rotate
- e2e_test_statefulset_arbitrary_config
- e2e_test_statefulset_arbitrary_config_update
- e2e_test_replica_set_mongod_config
teardown_task:
- func: upload_e2e_logs
tasks:
- name: build_operator_image
priority: 60
exec_timeout_secs: 600
commands:
- func: clone
- func: setup_virtualenv
- func: build_and_push_image
vars:
image_type: operator
image: quay.io/mongodb/community-operator-dev:${version_id}
expire_after: 48h
- name: build_e2e_image
priority: 60
exec_timeout_secs: 600
commands:
- func: clone
- func: setup_virtualenv
- func: build_and_push_image
vars:
image: quay.io/mongodb/community-operator-e2e:${version_id}
image_type: e2e
expire_after: 48h
- name: build_prehook_image
priority: 60
exec_timeout_secs: 600
commands:
- func: clone
- func: setup_virtualenv
- func: build_and_push_image
vars:
image: quay.io/mongodb/community-operator-version-upgrade-post-start-hook:${version_id}
image_type: versionhook
expire_after: 48h
- name: build_testrunner_image
priority: 60
exec_timeout_secs: 600
commands:
- func: clone
- func: setup_virtualenv
- func: build_and_push_image
vars:
image: quay.io/mongodb/community-operator-testrunner:${version_id}
image_type: testrunner
expire_after: 48h
- name: black_formatting
commands:
- func: clone
- func: setup_virtualenv
- func: black_formatting_test
- name: unit_tests
commands:
- func: clone
- func: setup_virtualenv
- func: go_test
- name: mypy_linting
commands:
- func: clone
- func: setup_virtualenv
- func: mypy_linting_test
- name: e2e_test_feature_compatibility_version
commands:
- func: run_e2e_test
vars:
test: feature_compatibility_version
- name: e2e_test_feature_compatibility_version_upgrade
commands:
- func: run_e2e_test
vars:
test: feature_compatibility_version
- name: e2e_test_replica_set
commands:
- func: run_e2e_test
vars:
test: replica_set
- name: e2e_test_replica_set_readiness_probe
commands:
- func: run_e2e_test
vars:
test: replica_set_readiness_probe
- name: e2e_test_replica_set_scale
commands:
- func: run_e2e_test
vars:
test: replica_set_scale
- name: e2e_test_replica_set_scale_down
exec_timeout_secs: 3600
commands:
- func: run_e2e_test
vars:
test: replica_set_scale_down
- name: e2e_test_replica_set_change_version
commands:
- func: run_e2e_test
vars:
test: replica_set_change_version
- name: e2e_test_replica_set_multiple
commands:
- func: run_e2e_test
vars:
test: replica_set_multiple
- name: e2e_test_replica_set_tls
commands:
- func: run_e2e_test
vars:
test: replica_set_tls
- name: e2e_test_replica_set_tls_upgrade
commands:
- func: run_e2e_test
vars:
test: replica_set_tls_upgrade
- name: e2e_test_replica_set_tls_rotate
commands:
- func: run_e2e_test
vars:
test: replica_set_tls_rotate
- name: e2e_test_statefulset_arbitrary_config
commands:
- func: run_e2e_test
vars:
test: statefulset_arbitrary_config
- name: e2e_test_statefulset_arbitrary_config_update
commands:
- func: run_e2e_test
vars:
test: statefulset_arbitrary_config_update
- name: e2e_test_replica_set_mongod_config
commands:
- func: run_e2e_test
vars:
test: replica_set_mongod_config
- name: release_blocker
commands:
- func: clone
- func: release_blocker
- name: release_operator
commands:
- func: clone
- func: setup_virtualenv
- func: release_docker_image
vars:
old_image: quay.io/mongodb/community-operator-dev
new_image: quay.io/mongodb/mongodb-kubernetes-operator
image_type: mongodb-kubernetes-operator
- name: release_version_upgrade_hook
commands:
- func: clone
- func: setup_virtualenv
- func: release_docker_image
vars:
old_image: quay.io/mongodb/community-operator-version-upgrade-post-start-hook
new_image: quay.io/mongodb/mongodb-kubernetes-operator-version-upgrade-post-start-hook
image_type: version-upgrade-hook
buildvariants:
- name: go_unit_tests
display_name: go_unit_tests
run_on:
- ubuntu1604-build
tasks:
- name: unit_tests
- name: e2e_tests
display_name: e2e_tests
run_on:
- ubuntu1604-build
depends_on:
- name: build_operator_image
variant: init_test_run
- name: build_e2e_image
variant: init_test_run
- name: build_prehook_image
variant: init_test_run
- name: build_testrunner_image
variant: init_test_run
tasks:
- name: e2e_test_group
- name: code_health
display_name: code_health
run_on:
- ubuntu1604-build
tasks:
- name: mypy_linting
- name: black_formatting
- name: init_test_run
display_name: init_test_run
run_on:
- ubuntu1604-build
tasks:
- name: build_operator_image
- name: build_e2e_image
- name: build_testrunner_image
- name: build_prehook_image
- name: release_blocker
display_name: release_blocker
run_on:
- ubuntu1604-packer # Note: cheapest machine I found
tasks:
- name: release_blocker
- name: release_images_quay
display_name: release_images_quay
depends_on:
- name: release_blocker
variant: release_blocker
- name: build_operator_image
variant: init_test_run
- name: build_prehook_image
variant: init_test_run
run_on:
- ubuntu1604-test
tasks:
- name: release_operator
- name: release_version_upgrade_hook