Skip to content

Commit 514eb09

Browse files
Merge branch 'master' into update-kind-and-image
2 parents 8dba2d1 + 55b869d commit 514eb09

File tree

76 files changed

+2482
-637
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2482
-637
lines changed

.evergreen-functions.yml

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,22 @@ functions:
5151

5252
### Setup Functions ###
5353

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+
5464
setup_context: &setup_context # Running the first switch is important to fill the workdir and other important initial env vars
5565
command: shell.exec
5666
type: setup
5767
params:
68+
add_to_path:
69+
- ${workdir}/bin
5870
shell: bash
5971
working_dir: src/github.com/mongodb/mongodb-kubernetes
6072
<<: *e2e_include_expansions_in_env
@@ -103,6 +115,7 @@ functions:
103115
type: setup
104116
params:
105117
command: "git config --global user.email '[email protected]'"
118+
- *setup_jq # we need jq in the context
106119
- *setup_context
107120

108121
setup_kubectl: &setup_kubectl
@@ -112,13 +125,6 @@ functions:
112125
working_dir: src/github.com/mongodb/mongodb-kubernetes
113126
binary: scripts/evergreen/setup_kubectl.sh
114127

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-
122128
setup_shellcheck:
123129
command: subprocess.exec
124130
type: setup
@@ -225,7 +231,7 @@ functions:
225231
working_dir: src/github.com/mongodb/mongodb-kubernetes
226232
add_to_path:
227233
- ${workdir}/bin
228-
binary: scripts/dev/configure_docker_auth.sh
234+
binary: scripts/dev/configure_container_auth.sh
229235

230236
setup_evg_host: &setup_evg_host
231237
command: subprocess.exec
@@ -256,16 +262,35 @@ functions:
256262
# Configures docker authentication to ECR and RH registries.
257263
setup_building_host:
258264
- *switch_context
265+
- *python_venv
259266
- *setup_aws
260-
- *configure_docker_auth
261267
- *setup_evg_host
262-
- *python_venv
268+
- *configure_docker_auth
263269

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
265274
- command: subprocess.exec
266275
type: setup
267276
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
269294
270295
# the task configures the set of tools necessary for any task working with K8 cluster:
271296
# installs kubectl, jq, kind (if necessary), configures docker authentication
@@ -327,8 +352,7 @@ functions:
327352
shell: bash
328353
working_dir: src/github.com/mongodb/mongodb-kubernetes
329354
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
332356
# The additional switch is needed, since we now have created the needed OM exports.
333357
- *switch_context
334358

@@ -340,8 +364,7 @@ functions:
340364
shell: bash
341365
working_dir: src/github.com/mongodb/mongodb-kubernetes
342366
script: |
343-
source .generated/context.export.env
344-
scripts/evergreen/e2e/setup_cloud_qa.py delete
367+
scripts/dev/run_python.sh scripts/evergreen/e2e/setup_cloud_qa.py delete
345368
346369
dump_diagnostic_information_from_all_namespaces:
347370
- command: subprocess.exec
@@ -506,25 +529,28 @@ functions:
506529
- ${workdir}/bin
507530
- ${workdir}
508531

509-
pipeline:
532+
build_test_image_ibm:
510533
- *switch_context
511-
- command: shell.exec
512-
type: setup
534+
- command: subprocess.exec
513535
params:
514536
shell: bash
515-
script: |
516-
# Docker Hub workaround
517-
# docker buildx needs the moby/buildkit image when setting up a builder so we pull it from our mirror
518-
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
519-
docker buildx inspect --bootstrap
537+
working_dir: src/github.com/mongodb/mongodb-kubernetes
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
543+
544+
pipeline:
545+
- *switch_context
520546
- command: subprocess.exec
521547
retry_on_failure: true
522548
type: setup
523549
params:
524550
shell: bash
525551
<<: *e2e_include_expansions_in_env
526552
working_dir: src/github.com/mongodb/mongodb-kubernetes
527-
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name} ${all_agents}
553+
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name} ${all_agents} ${build_scenario}
528554

529555
# TODO: CLOUDP-335471 ; once all image builds are made with the new atomic pipeline, remove the following function
530556
legacy_pipeline:

0 commit comments

Comments
 (0)