@@ -51,10 +51,22 @@ functions:
51
51
52
52
# ## Setup Functions ###
53
53
54
+ setup_jq : &setup_jq
55
+ command : subprocess.exec
56
+ type : setup
57
+ params :
58
+ << : *e2e_include_expansions_in_env
59
+ add_to_path :
60
+ - ${workdir}/bin
61
+ working_dir : src/github.com/mongodb/mongodb-kubernetes
62
+ binary : scripts/evergreen/setup_jq.sh
63
+
54
64
setup_context : &setup_context # Running the first switch is important to fill the workdir and other important initial env vars
55
65
command : shell.exec
56
66
type : setup
57
67
params :
68
+ add_to_path :
69
+ - ${workdir}/bin
58
70
shell : bash
59
71
working_dir : src/github.com/mongodb/mongodb-kubernetes
60
72
<< : *e2e_include_expansions_in_env
@@ -103,6 +115,7 @@ functions:
103
115
type : setup
104
116
params :
105
117
command :
" git config --global user.email '[email protected] '"
118
+ - *setup_jq # we need jq in the context
106
119
- *setup_context
107
120
108
121
setup_kubectl : &setup_kubectl
@@ -112,13 +125,6 @@ functions:
112
125
working_dir : src/github.com/mongodb/mongodb-kubernetes
113
126
binary : scripts/evergreen/setup_kubectl.sh
114
127
115
- setup_jq : &setup_jq
116
- command : subprocess.exec
117
- type : setup
118
- params :
119
- working_dir : src/github.com/mongodb/mongodb-kubernetes
120
- binary : scripts/evergreen/setup_jq.sh
121
-
122
128
setup_shellcheck :
123
129
command : subprocess.exec
124
130
type : setup
@@ -225,7 +231,7 @@ functions:
225
231
working_dir : src/github.com/mongodb/mongodb-kubernetes
226
232
add_to_path :
227
233
- ${workdir}/bin
228
- binary : scripts/dev/configure_docker_auth .sh
234
+ binary : scripts/dev/configure_container_auth .sh
229
235
230
236
setup_evg_host : &setup_evg_host
231
237
command : subprocess.exec
@@ -256,16 +262,35 @@ functions:
256
262
# Configures docker authentication to ECR and RH registries.
257
263
setup_building_host :
258
264
- *switch_context
265
+ - *python_venv
259
266
- *setup_aws
260
- - *configure_docker_auth
261
267
- *setup_evg_host
262
- - *python_venv
268
+ - *configure_docker_auth
263
269
264
- prune_docker_resources :
270
+ # This differs for normal evg_host as we require minikube instead of kind for
271
+ # IBM machines also install aws cli via pip instead and use podman
272
+ setup_building_host_minikube :
273
+ - *switch_context
265
274
- command : subprocess.exec
266
275
type : setup
267
276
params :
268
- command : " docker system prune -a -f"
277
+ working_dir : src/github.com/mongodb/mongodb-kubernetes
278
+ add_to_path :
279
+ - ${workdir}/bin
280
+ command : scripts/evergreen/setup_minikube_host.sh
281
+
282
+ prune_docker_resources :
283
+ - command : shell.exec
284
+ type : setup
285
+ params :
286
+ shell : bash
287
+ script : |
288
+ if command -v docker >/dev/null 2>&1; then
289
+ echo "Docker found, pruning docker resources..."
290
+ docker system prune -a -f
291
+ else
292
+ echo "Docker not found, skipping docker resource pruning"
293
+ fi
269
294
270
295
# the task configures the set of tools necessary for any task working with K8 cluster:
271
296
# installs kubectl, jq, kind (if necessary), configures docker authentication
@@ -327,20 +352,19 @@ functions:
327
352
shell : bash
328
353
working_dir : src/github.com/mongodb/mongodb-kubernetes
329
354
script : |
330
- source .generated/context.export.env
331
- scripts/evergreen/e2e/setup_cloud_qa.py create
355
+ scripts/dev/run_python.sh scripts/evergreen/e2e/setup_cloud_qa.py create
332
356
# The additional switch is needed, since we now have created the needed OM exports.
333
357
- *switch_context
334
358
335
359
teardown_cloud_qa :
336
360
- command : shell.exec
337
361
type : setup
338
362
params :
363
+ continue_on_err : true
339
364
shell : bash
340
365
working_dir : src/github.com/mongodb/mongodb-kubernetes
341
366
script : |
342
- source .generated/context.export.env
343
- scripts/evergreen/e2e/setup_cloud_qa.py delete
367
+ scripts/dev/run_python.sh scripts/evergreen/e2e/setup_cloud_qa.py delete
344
368
345
369
dump_diagnostic_information_from_all_namespaces :
346
370
- command : subprocess.exec
@@ -420,6 +444,7 @@ functions:
420
444
upload_e2e_logs :
421
445
- command : s3.put
422
446
params :
447
+ continue_on_err : true
423
448
aws_key : ${enterprise_aws_access_key_id}
424
449
aws_secret : ${enterprise_aws_secret_access_key}
425
450
local_files_include_filter :
@@ -431,6 +456,7 @@ functions:
431
456
content_type : text/plain
432
457
- command : attach.xunit_results
433
458
params :
459
+ continue_on_err : true
434
460
file : " src/github.com/mongodb/mongodb-kubernetes/logs/myreport.xml"
435
461
436
462
upload_e2e_logs_gotest :
@@ -504,84 +530,52 @@ functions:
504
530
- ${workdir}/bin
505
531
- ${workdir}
506
532
507
- pipeline :
533
+ build_test_image_ibm :
508
534
- *switch_context
509
- - command : shell.exec
510
- type : setup
535
+ - command : subprocess.exec
511
536
params :
512
537
shell : bash
513
- script : |
514
- # Docker Hub workaround
515
- # docker buildx needs the moby/buildkit image when setting up a builder so we pull it from our mirror
516
- docker buildx create --driver=docker-container --driver-opt=image=268558157000.dkr.ecr.eu-west-1.amazonaws.com/docker-hub-mirrors/moby/buildkit:buildx-stable-1 --use
517
- docker buildx inspect --bootstrap
538
+ working_dir : src/github.com/mongodb/mongodb-kubernetes
539
+ include_expansions_in_env :
540
+ - version_id
541
+ add_to_path :
542
+ - ${workdir}/bin
543
+ binary : scripts/evergreen/e2e/build_tests_image_ibm.sh
544
+
545
+ pipeline_migrate_agents :
546
+ - *switch_context
518
547
- command : subprocess.exec
519
- retry_on_failure : true
548
+ retry_on_failure : false
520
549
type : setup
521
550
params :
522
551
shell : bash
523
552
<< : *e2e_include_expansions_in_env
524
553
working_dir : src/github.com/mongodb/mongodb-kubernetes
525
- binary : scripts/dev/run_python.sh scripts/ release/pipeline_main.py --parallel ${image_name}
554
+ binary : scripts/release/pipeline_migrate_agent.sh
526
555
527
- release_pipeline :
556
+ pipeline :
528
557
- *switch_context
529
- - command : shell.exec
530
- type : setup
531
- params :
532
- shell : bash
533
- script : |
534
- # Docker Hub workaround
535
- # docker buildx needs the moby/buildkit image when setting up a builder so we pull it from our mirror
536
- docker buildx create --driver=docker-container --driver-opt=image=268558157000.dkr.ecr.eu-west-1.amazonaws.com/docker-hub-mirrors/moby/buildkit:buildx-stable-1 --use
537
- docker buildx inspect --bootstrap
538
558
- command : subprocess.exec
539
559
retry_on_failure : true
540
560
type : setup
541
561
params :
542
562
shell : bash
543
563
<< : *e2e_include_expansions_in_env
544
564
working_dir : src/github.com/mongodb/mongodb-kubernetes
545
- env :
546
- git_tag : ${triggered_by_git_tag}
547
- binary : scripts/dev/run_python.sh scripts/release/pipeline_main.py ${image_name} --build-scenario release --version ${git_tag}
565
+ binary : scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name} ${all_agents} ${build_scenario}
548
566
549
- # TODO: CLOUDP-335471 ; once all image builds are made with the new atomic pipeline, remove the following function
550
- legacy_pipeline :
567
+ release_pipeline :
551
568
- *switch_context
552
- - command : shell.exec
553
- type : setup
554
- params :
555
- shell : bash
556
- script : |
557
- # Docker Hub workaround
558
- # docker buildx needs the moby/buildkit image when setting up a builder so we pull it from our mirror
559
- docker buildx create --driver=docker-container --driver-opt=image=268558157000.dkr.ecr.eu-west-1.amazonaws.com/docker-hub-mirrors/moby/buildkit:buildx-stable-1 --use
560
- docker buildx inspect --bootstrap
561
- - command : ec2.assume_role
562
- display_name : Assume IAM role with permissions to pull Kondukto API token
563
- params :
564
- role_arn : ${kondukto_role_arn}
565
- - command : shell.exec
566
- display_name : Pull Kondukto API token from AWS Secrets Manager and write it to file
567
- params :
568
- silent : true
569
- shell : bash
570
- include_expansions_in_env : [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
571
- script : |
572
- set -e
573
- # use AWS CLI to get the Kondukto API token from AWS Secrets Manager
574
- kondukto_token=$(aws secretsmanager get-secret-value --secret-id "kondukto-token" --region "us-east-1" --query 'SecretString' --output text)
575
- # write the KONDUKTO_TOKEN environment variable to Silkbomb environment file
576
- echo "KONDUKTO_TOKEN=$kondukto_token" > ${workdir}/silkbomb.env
577
569
- command : subprocess.exec
578
570
retry_on_failure : true
579
571
type : setup
580
572
params :
581
573
shell : bash
582
574
<< : *e2e_include_expansions_in_env
583
575
working_dir : src/github.com/mongodb/mongodb-kubernetes
584
- binary : scripts/dev/run_python.sh pipeline.py --include ${image_name} --parallel --sign
576
+ env :
577
+ git_tag : ${triggered_by_git_tag}
578
+ binary : scripts/dev/run_python.sh scripts/release/pipeline_main.py ${image_name} --build-scenario release --version ${git_tag}
585
579
586
580
teardown_cloud_qa_all :
587
581
- *switch_context
0 commit comments