Skip to content

Commit a1d2216

Browse files
committed
Merge branch 'master' into maciejk/ar-image-staging
# Conflicts: # build_info.json # scripts/dev/contexts/e2e_mdb_kind_ubi_cloudqa # scripts/dev/contexts/e2e_static_mdb_kind_ubi_cloudqa # scripts/dev/contexts/local-defaults-context # scripts/dev/contexts/variables/om60 # scripts/release/atomic_pipeline.py # scripts/release/build/image_build_configuration.py # scripts/release/build/image_build_process.py # scripts/release/pipeline_main.py # scripts/release/tests/build_info_test.py # scripts/release/tests/release_info_test.py
2 parents 18582c7 + 5b684c6 commit a1d2216

File tree

140 files changed

+3503
-1221
lines changed

Some content is hidden

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

140 files changed

+3503
-1221
lines changed

.evergreen-functions.yml

Lines changed: 61 additions & 39 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
@@ -433,6 +456,7 @@ functions:
433456
content_type: text/plain
434457
- command: attach.xunit_results
435458
params:
459+
continue_on_err: true
436460
file: "src/github.com/mongodb/mongodb-kubernetes/logs/myreport.xml"
437461

438462
upload_e2e_logs_gotest:
@@ -506,41 +530,39 @@ functions:
506530
- ${workdir}/bin
507531
- ${workdir}
508532

509-
pipeline:
533+
build_test_image_ibm:
510534
- *switch_context
511-
- command: shell.exec
512-
type: setup
535+
- command: subprocess.exec
513536
params:
514537
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
520-
- command: ec2.assume_role
521-
display_name: Assume IAM role with permissions to pull Kondukto API token
522-
params:
523-
role_arn: ${kondukto_role_arn}
524-
- command: shell.exec
525-
display_name: Pull Kondukto API token from AWS Secrets Manager and write it to file
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
547+
- command: subprocess.exec
548+
retry_on_failure: false
549+
type: setup
526550
params:
527-
silent: true
528551
shell: bash
529-
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
530-
script: |
531-
set -e
532-
# use AWS CLI to get the Kondukto API token from AWS Secrets Manager
533-
kondukto_token=$(aws secretsmanager get-secret-value --secret-id "kondukto-token" --region "us-east-1" --query 'SecretString' --output text)
534-
# write the KONDUKTO_TOKEN environment variable to Silkbomb environment file
535-
echo "KONDUKTO_TOKEN=$kondukto_token" > ${workdir}/silkbomb.env
552+
<<: *e2e_include_expansions_in_env
553+
working_dir: src/github.com/mongodb/mongodb-kubernetes
554+
binary: scripts/release/pipeline_migrate_agent.sh
555+
556+
pipeline:
557+
- *switch_context
536558
- command: subprocess.exec
537559
retry_on_failure: true
538560
type: setup
539561
params:
540562
shell: bash
541563
<<: *e2e_include_expansions_in_env
542564
working_dir: src/github.com/mongodb/mongodb-kubernetes
543-
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name}
565+
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name} ${all_agents} ${build_scenario}
544566

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

0 commit comments

Comments
 (0)