@@ -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
@@ -86,17 +98,6 @@ functions:
86
98
working_dir : src/github.com/mongodb/mongodb-kubernetes
87
99
command : scripts/dev/recreate_python_venv.sh
88
100
89
- docker_buildkit : &docker_buildkit
90
- command : shell.exec
91
- type : setup
92
- params :
93
- shell : bash
94
- script : |
95
- # Docker Hub workaround
96
- # docker buildx needs the moby/buildkit image when setting up a builder so we pull it from our mirror
97
- 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
98
- docker buildx inspect --bootstrap
99
-
100
101
" clone " :
101
102
- command : subprocess.exec
102
103
type : setup
@@ -114,6 +115,7 @@ functions:
114
115
type : setup
115
116
params :
116
117
command :
" git config --global user.email '[email protected] '"
118
+ - *setup_jq # we need jq in the context
117
119
- *setup_context
118
120
119
121
setup_kubectl : &setup_kubectl
@@ -123,13 +125,6 @@ functions:
123
125
working_dir : src/github.com/mongodb/mongodb-kubernetes
124
126
binary : scripts/evergreen/setup_kubectl.sh
125
127
126
- setup_jq : &setup_jq
127
- command : subprocess.exec
128
- type : setup
129
- params :
130
- working_dir : src/github.com/mongodb/mongodb-kubernetes
131
- binary : scripts/evergreen/setup_jq.sh
132
-
133
128
setup_shellcheck :
134
129
command : subprocess.exec
135
130
type : setup
@@ -236,7 +231,7 @@ functions:
236
231
working_dir : src/github.com/mongodb/mongodb-kubernetes
237
232
add_to_path :
238
233
- ${workdir}/bin
239
- binary : scripts/dev/configure_docker_auth .sh
234
+ binary : scripts/dev/configure_container_auth .sh
240
235
241
236
setup_evg_host : &setup_evg_host
242
237
command : subprocess.exec
@@ -267,16 +262,35 @@ functions:
267
262
# Configures docker authentication to ECR and RH registries.
268
263
setup_building_host :
269
264
- *switch_context
265
+ - *python_venv
270
266
- *setup_aws
271
- - *configure_docker_auth
272
267
- *setup_evg_host
273
- - *python_venv
268
+ - *configure_docker_auth
274
269
275
- 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
276
274
- command : subprocess.exec
277
275
type : setup
278
276
params :
279
- 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
280
294
281
295
# the task configures the set of tools necessary for any task working with K8 cluster:
282
296
# installs kubectl, jq, kind (if necessary), configures docker authentication
@@ -338,8 +352,7 @@ functions:
338
352
shell : bash
339
353
working_dir : src/github.com/mongodb/mongodb-kubernetes
340
354
script : |
341
- source .generated/context.export.env
342
- scripts/evergreen/e2e/setup_cloud_qa.py create
355
+ scripts/dev/run_python.sh scripts/evergreen/e2e/setup_cloud_qa.py create
343
356
# The additional switch is needed, since we now have created the needed OM exports.
344
357
- *switch_context
345
358
@@ -351,8 +364,7 @@ functions:
351
364
shell : bash
352
365
working_dir : src/github.com/mongodb/mongodb-kubernetes
353
366
script : |
354
- source .generated/context.export.env
355
- scripts/evergreen/e2e/setup_cloud_qa.py delete
367
+ scripts/dev/run_python.sh scripts/evergreen/e2e/setup_cloud_qa.py delete
356
368
357
369
dump_diagnostic_information_from_all_namespaces :
358
370
- command : subprocess.exec
@@ -517,21 +529,20 @@ functions:
517
529
- ${workdir}/bin
518
530
- ${workdir}
519
531
520
- pipeline :
532
+ build_test_image_ibm :
521
533
- *switch_context
522
- - *docker_buildkit
523
534
- command : subprocess.exec
524
- retry_on_failure : true
525
- type : setup
526
535
params :
527
536
shell : bash
528
- << : *e2e_include_expansions_in_env
529
537
working_dir : src/github.com/mongodb/mongodb-kubernetes
530
- binary : scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name} ${all_agents} ${build_scenario}
538
+ include_expansions_in_env :
539
+ - version_id
540
+ add_to_path :
541
+ - ${workdir}/bin
542
+ binary : scripts/evergreen/e2e/build_tests_image_ibm.sh
531
543
532
544
pipeline_migrate_agents :
533
545
- *switch_context
534
- - *docker_buildkit
535
546
- command : subprocess.exec
536
547
retry_on_failure : false
537
548
type : setup
@@ -541,10 +552,29 @@ functions:
541
552
working_dir : src/github.com/mongodb/mongodb-kubernetes
542
553
binary : scripts/release/pipeline_migrate_agent.sh
543
554
555
+ pipeline :
556
+ - *switch_context
557
+ - command : subprocess.exec
558
+ retry_on_failure : true
559
+ type : setup
560
+ params :
561
+ shell : bash
562
+ << : *e2e_include_expansions_in_env
563
+ working_dir : src/github.com/mongodb/mongodb-kubernetes
564
+ binary : scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name} ${all_agents} ${build_scenario}
565
+
544
566
# TODO: CLOUDP-335471 ; once all image builds are made with the new atomic pipeline, remove the following function
545
567
legacy_pipeline :
546
568
- *switch_context
547
- - *docker_buildkit
569
+ - command : shell.exec
570
+ type : setup
571
+ params :
572
+ shell : bash
573
+ script : |
574
+ # Docker Hub workaround
575
+ # docker buildx needs the moby/buildkit image when setting up a builder so we pull it from our mirror
576
+ 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
577
+ docker buildx inspect --bootstrap
548
578
- command : ec2.assume_role
549
579
display_name : Assume IAM role with permissions to pull Kondukto API token
550
580
params :
0 commit comments