Skip to content

Commit 40f9aa1

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongodb-kubernetes into multi-arch-pipeline-combined
2 parents d7f0538 + da6c026 commit 40f9aa1

File tree

62 files changed

+841
-429
lines changed

Some content is hidden

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

62 files changed

+841
-429
lines changed

.evergreen-functions.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ functions:
360360
- command: shell.exec
361361
type: setup
362362
params:
363+
continue_on_err: true
363364
shell: bash
364365
working_dir: src/github.com/mongodb/mongodb-kubernetes
365366
script: |
@@ -443,6 +444,7 @@ functions:
443444
upload_e2e_logs:
444445
- command: s3.put
445446
params:
447+
continue_on_err: true
446448
aws_key: ${enterprise_aws_access_key_id}
447449
aws_secret: ${enterprise_aws_secret_access_key}
448450
local_files_include_filter:
@@ -550,30 +552,14 @@ functions:
550552
# docker buildx needs the moby/buildkit image when setting up a builder so we pull it from our mirror
551553
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
552554
docker buildx inspect --bootstrap
553-
- command: ec2.assume_role
554-
display_name: Assume IAM role with permissions to pull Kondukto API token
555-
params:
556-
role_arn: ${kondukto_role_arn}
557-
- command: shell.exec
558-
display_name: Pull Kondukto API token from AWS Secrets Manager and write it to file
559-
params:
560-
silent: true
561-
shell: bash
562-
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
563-
script: |
564-
set -e
565-
# use AWS CLI to get the Kondukto API token from AWS Secrets Manager
566-
kondukto_token=$(aws secretsmanager get-secret-value --secret-id "kondukto-token" --region "us-east-1" --query 'SecretString' --output text)
567-
# write the KONDUKTO_TOKEN environment variable to Silkbomb environment file
568-
echo "KONDUKTO_TOKEN=$kondukto_token" > ${workdir}/silkbomb.env
569555
- command: subprocess.exec
570556
retry_on_failure: true
571557
type: setup
572558
params:
573559
shell: bash
574560
<<: *e2e_include_expansions_in_env
575561
working_dir: src/github.com/mongodb/mongodb-kubernetes
576-
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name}
562+
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name} ${all_agents}
577563

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

.evergreen-periodic-builds.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ variables:
1919
- func: switch_context
2020

2121
tasks:
22+
- name: periodic_teardown_aws
23+
commands:
24+
- func: cleanup_aws
25+
26+
- name: periodic_teardown_cloudqa
27+
commands:
28+
- func: teardown_cloud_qa_all
29+
30+
task_groups:
2231
- name: periodic_teardown_task_group
2332
<<: *setup_group
2433
tasks:

.evergreen.yml

Lines changed: 47 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ variables:
6161
variant: init_test_run
6262
- name: build_test_image
6363
variant: init_test_run
64-
- name: build_agent_images_ubi
65-
variant: init_test_run
6664
- name: build_readiness_probe_image
6765
variant: init_test_run
6866
- name: build_upgrade_hook_image
6967
variant: init_test_run
7068
- name: build_mco_test_image
7169
variant: init_test_run
70+
- name: build_agent_images_ubi
71+
variant: init_test_run
7272

7373
- &setup_group
7474
setup_group_can_fail_task: true
@@ -124,9 +124,9 @@ variables:
124124
- func: setup_cloud_qa
125125
teardown_task_can_fail_task: true
126126
teardown_task:
127+
- func: teardown_cloud_qa
127128
- func: upload_e2e_logs
128129
- func: teardown_kubernetes_environment
129-
- func: teardown_cloud_qa
130130

131131
- &setup_and_teardown_task
132132
setup_task_can_fail_task: true
@@ -163,6 +163,25 @@ variables:
163163
- name: build_agent_images_ubi
164164
variant: init_test_run
165165

166+
- &base_om7_dependency_with_race
167+
depends_on:
168+
- name: build_om_images
169+
variant: build_om70_images
170+
- name: build_operator_race_ubi
171+
variant: init_test_run
172+
- name: build_init_database_image_ubi
173+
variant: init_test_run
174+
- name: build_database_image_ubi
175+
variant: init_test_run
176+
- name: build_test_image
177+
variant: init_test_run
178+
- name: build_init_appdb_images_ubi
179+
variant: init_test_run
180+
- name: build_init_om_images_ubi
181+
variant: init_test_run
182+
- name: build_agent_images_ubi
183+
variant: init_test_run
184+
166185
- &base_om8_dependency
167186
depends_on:
168187
- name: build_om_images
@@ -335,19 +354,6 @@ tasks:
335354
image_name: init-ops-manager
336355
include_tags: release
337356

338-
- name: release_agent_operator_release
339-
tags: [ "image_release" ]
340-
allowed_requesters: [ "patch", "github_tag" ]
341-
commands:
342-
- func: clone
343-
- func: setup_building_host
344-
- func: quay_login
345-
- func: setup_docker_sbom
346-
- func: legacy_pipeline
347-
vars:
348-
image_name: agent
349-
include_tags: release
350-
351357
# pct only triggers this variant once a new agent image is out
352358
- name: release_agent
353359
# this enables us to run this variant either manually (patch) which pct does or during an OM bump (github_pr)
@@ -359,8 +365,7 @@ tasks:
359365
- func: setup_docker_sbom
360366
- func: legacy_pipeline
361367
vars:
362-
image_name: agent-pct
363-
include_tags: release
368+
image_name: agent
364369

365370
- name: run_precommit_and_push
366371
tags: ["patch-run"]
@@ -380,48 +385,17 @@ tasks:
380385
working_dir: src/github.com/mongodb/mongodb-kubernetes
381386
binary: scripts/evergreen/precommit_bump.sh
382387

383-
# Pct only triggers this variant once a new agent image is out
384-
# these releases the agent with the operator suffix (not patch id) on ecr to allow for digest pinning to pass.
385-
# For this to work, we rely on skip_tags which is used to determine whether
386-
# we want to release on quay or not, in this case - ecr instead.
387-
# We rely on the init_database from ecr for the agent x operator images.
388-
# This runs on agent releases that are not concurrent with operator releases.
389-
- name: release_agents_on_ecr_conditional
390-
commands:
391-
- func: clone
392-
- func: run_task_conditionally
393-
vars:
394-
condition_script: scripts/evergreen/should_release_agents_on_ecr.sh
395-
variant: init_release_agents_on_ecr
396-
task: release_agents_on_ecr
397-
398-
- name: release_agents_on_ecr
399-
# this enables us to run this variant either manually (patch) which pct does or during an OM bump (github_pr)
400-
allowed_requesters: [ "patch", "github_pr" ]
401-
priority: 70
402-
commands:
403-
- func: clone
404-
- func: setup_building_host
405-
- func: legacy_pipeline
406-
vars:
407-
image_name: agent-pct
408-
skip_tags: release
409-
410388
- name: release_all_agents_on_ecr
411-
# this enables us to run this manually (patch) and release all agent versions to ECR
412-
# it's needed during operator new version release process - e2e tests (especially olm tests)
413-
# will look for agent with new operator version suffix, but during PR checks we only build
414-
# agent versions for most recent major OM versions and the tests will fail. Before running the PR
415-
# we have to manually release all agents to ECR by triggering this patch
389+
# this enables us to run this manually (patch) and release all agent versions to ECR to verify
390+
# Dockerfile, script changes etc.
416391
allowed_requesters: [ "patch" ]
417392
commands:
418393
- func: clone
419394
- func: setup_building_host
420-
- func: legacy_pipeline
395+
- func: pipeline
421396
vars:
422-
image_name: agent-pct
423-
skip_tags: release
424-
all_agents: true
397+
image_name: agent
398+
all_agents: "--all-agents"
425399

426400
- name: build_test_image
427401
commands:
@@ -461,18 +435,23 @@ tasks:
461435
- func: setup_building_host
462436
- func: pipeline
463437
vars:
464-
skip_tags: ubuntu,release
465-
distro: ubi
466438
image_name: operator
467439

440+
- name: build_operator_race_ubi
441+
commands:
442+
- func: clone
443+
- func: setup_building_host
444+
- func: pipeline
445+
vars:
446+
image_name: operator-race
447+
468448
- name: build_init_om_images_ubi
469449
commands:
470450
- func: clone
471451
- func: setup_building_host
472452
- func: pipeline
473453
vars:
474454
image_name: init-ops-manager
475-
skip_tags: ubuntu,release
476455

477456
- name: build_init_appdb_images_ubi
478457
commands:
@@ -481,7 +460,6 @@ tasks:
481460
- func: pipeline
482461
vars:
483462
image_name: init-appdb
484-
skip_tags: ubuntu,release
485463

486464
- name: build_agent_images_ubi
487465
commands:
@@ -490,7 +468,6 @@ tasks:
490468
- func: pipeline
491469
vars:
492470
image_name: agent
493-
skip_tags: ubuntu,release
494471

495472
- name: build_init_database_image_ubi
496473
commands:
@@ -499,7 +476,6 @@ tasks:
499476
- func: pipeline
500477
vars:
501478
image_name: init-database
502-
skip_tags: ubuntu,release
503479

504480
- name: build_database_image_ubi
505481
commands:
@@ -508,7 +484,6 @@ tasks:
508484
- func: pipeline
509485
vars:
510486
image_name: database
511-
skip_tags: ubuntu,release
512487

513488
- name: build_readiness_probe_image
514489
commands:
@@ -517,7 +492,6 @@ tasks:
517492
- func: pipeline
518493
vars:
519494
image_name: readiness-probe
520-
skip_tags: ubuntu,release
521495

522496
- name: build_upgrade_hook_image
523497
commands:
@@ -526,7 +500,6 @@ tasks:
526500
- func: pipeline
527501
vars:
528502
image_name: upgrade-hook
529-
skip_tags: ubuntu,release
530503

531504
- name: prepare_aws
532505
priority: 59
@@ -1354,8 +1327,7 @@ buildvariants:
13541327
variant: init_test_run
13551328
- name: build_init_database_image_ubi
13561329
variant: init_test_run
1357-
- name: build_agent_images_ubi
1358-
variant: init_test_run
1330+
13591331
tasks:
13601332
- name: e2e_custom_domain_task_group
13611333

@@ -1389,8 +1361,7 @@ buildvariants:
13891361
variant: init_test_run
13901362
- name: build_init_database_image_ubi
13911363
variant: init_test_run
1392-
- name: build_agent_images_ubi
1393-
variant: init_test_run
1364+
13941365
run_on:
13951366
- ubuntu2204-small
13961367
tasks:
@@ -1472,7 +1443,7 @@ buildvariants:
14721443
tags: [ "e2e_test_suite" ]
14731444
run_on:
14741445
- ubuntu1804-xlarge
1475-
<<: *base_om7_dependency
1446+
<<: *base_om7_dependency_with_race
14761447
tasks:
14771448
- name: e2e_operator_race_with_telemetry_task_group
14781449

@@ -1674,6 +1645,8 @@ buildvariants:
16741645
variant: init_test_run
16751646
- name: prepare_and_upload_openshift_bundles_for_e2e
16761647
variant: init_tests_with_olm
1648+
- name: build_agent_images_ubi
1649+
variant: init_test_run
16771650
tasks:
16781651
- name: e2e_kind_olm_group
16791652

@@ -1699,6 +1672,7 @@ buildvariants:
16991672
variant: init_test_run
17001673
- name: build_agent_images_ubi
17011674
variant: init_test_run
1675+
17021676
tasks:
17031677
- name: e2e_kind_olm_group
17041678

@@ -1751,6 +1725,7 @@ buildvariants:
17511725
- ubuntu2204-small
17521726
tasks:
17531727
- name: build_operator_ubi
1728+
- name: build_operator_race_ubi
17541729
- name: build_test_image
17551730
- name: build_mco_test_image
17561731
- name: build_init_appdb_images_ubi
@@ -1780,18 +1755,6 @@ buildvariants:
17801755
tasks:
17811756
- name: build_test_image_ibm
17821757

1783-
- name: init_release_agents_on_ecr
1784-
display_name: init_release_agents_on_ecr
1785-
# this enables us to run this variant either manually (patch) which pct does or during an OM bump (github_pr)
1786-
allowed_requesters: [ "patch", "github_pr" ]
1787-
tags: [ "release_agents_on_ecr" ]
1788-
# We want that to run first and finish asap. Digest pinning depends on this to succeed.
1789-
priority: 70
1790-
run_on:
1791-
- ubuntu2204-large
1792-
tasks:
1793-
- name: release_agents_on_ecr_conditional
1794-
17951758
- name: run_pre_commit
17961759
priority: 70
17971760
display_name: run_pre_commit
@@ -1819,8 +1782,7 @@ buildvariants:
18191782
variant: init_test_run
18201783
- name: build_init_om_images_ubi
18211784
variant: init_test_run
1822-
- name: build_agent_images_ubi
1823-
variant: init_test_run
1785+
18241786
run_on:
18251787
- ubuntu2204-small
18261788
tasks:
@@ -1906,13 +1868,6 @@ buildvariants:
19061868
- name: release_init_database
19071869
- name: release_init_ops_manager
19081870
- name: release_database
1909-
# Once we release the operator, we will also release the init databases, we require them to be out first
1910-
# such that we can reference them and retrieve those binaries.
1911-
# Since we immediately run daily rebuild after creating the image, we can ensure that the init_database is out
1912-
# such that the agent image build can use it.
1913-
- name: release_agent_operator_release
1914-
depends_on:
1915-
- name: release_init_database
19161871

19171872
- name: preflight_release_images
19181873
display_name: preflight_release_images
@@ -1944,13 +1899,13 @@ buildvariants:
19441899

19451900
# It will be called by pct while bumping the agent cloud manager image
19461901
- name: release_agent
1947-
display_name: (Static Containers) Release Agent matrix
1902+
display_name: release_agent
19481903
tags: [ "release_agent" ]
19491904
run_on:
19501905
- release-ubuntu2204-large # This is required for CISA attestation https://jira.mongodb.org/browse/DEVPROD-17780
19511906
depends_on:
1952-
- variant: init_release_agents_on_ecr
1953-
name: '*'
1907+
- variant: init_test_run
1908+
name: build_agent_images_ubi # this ensures the agent gets released to ECR as well
19541909
- variant: e2e_multi_cluster_kind
19551910
name: '*'
19561911
- variant: e2e_static_multi_cluster_2_clusters

0 commit comments

Comments
 (0)