Skip to content

CLOUDP-295785 - using build_info.json in new atomic pipeline #317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 87 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 79 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
6649987
Re-design pipeline
Julien-Ben Jun 12, 2025
675bee4
Remove file
Julien-Ben Jul 29, 2025
833e25f
Put lib back in dependencies
Julien-Ben Jul 29, 2025
15e7f51
add todo
Julien-Ben Jul 29, 2025
120c1af
Fix
Julien-Ben Jul 29, 2025
c9ceabf
Remove multi arch call, fix test image path
Julien-Ben Jul 29, 2025
fb87f4d
Fix agent version for default case
Julien-Ben Jul 30, 2025
c05e180
Lindt
Julien-Ben Jul 30, 2025
747c4ba
isort
Julien-Ben Jul 30, 2025
03fd9b8
Cleanup TODOs
Julien-Ben Jul 30, 2025
1fbb8d5
Rename arch -> platform
Julien-Ben Aug 4, 2025
e9a524f
Don't rely on exception to check for builder existence
Julien-Ben Aug 4, 2025
fa6b899
Remove unused variables
Julien-Ben Aug 4, 2025
426e522
Pre commit
Julien-Ben Aug 4, 2025
6890858
Cleanup
Julien-Ben Aug 4, 2025
aab9592
Correct build envs
Julien-Ben Aug 4, 2025
33173bb
Lindt
Julien-Ben Aug 4, 2025
74e867c
Update Makefile
Julien-Ben Aug 4, 2025
b13b054
Add TODO
Julien-Ben Aug 4, 2025
832ce61
Revert "Pre commit"
Julien-Ben Aug 4, 2025
bc23827
Remove agent unused functions
Julien-Ben Aug 6, 2025
03062c3
Remove debug
Julien-Ben Aug 6, 2025
4d4e4e9
Remove args iteration for multi platform
Julien-Ben Aug 6, 2025
7c9967a
Cleanup unused stuff
Julien-Ben Aug 6, 2025
a7c63c9
Cleanup
Julien-Ben Aug 6, 2025
742e784
Rename file
Julien-Ben Aug 6, 2025
1f0a21b
Remove cli sbom
Julien-Ben Aug 6, 2025
813d539
Renamed image building file
Julien-Ben Aug 6, 2025
c06061b
Freeze python on whales
Julien-Ben Aug 6, 2025
5f9d49a
Lint
Julien-Ben Aug 6, 2025
f390dc9
Remove everything SBOM related
Julien-Ben Aug 6, 2025
a47341d
Lint
Julien-Ben Aug 6, 2025
972b23c
Add TODO
Julien-Ben Aug 6, 2025
4ae4034
Remove --all-agents
Julien-Ben Aug 6, 2025
291f043
Merge branch 'master' into julienben/redesign-pipeline
MaciejKaras Aug 7, 2025
88c76bc
Rename trace
Julien-Ben Aug 7, 2025
0fd4db8
Remove operator build
Julien-Ben Aug 7, 2025
ee86ebf
Doc and logs
Julien-Ben Aug 7, 2025
5f5940f
Use build_image_generic for test images too
Julien-Ben Aug 7, 2025
6dd208f
Remove unused sign images in repositories
Julien-Ben Aug 7, 2025
493d4d6
Remove pipeline_process_image
Julien-Ben Aug 7, 2025
a21b254
Remove process_image
Julien-Ben Aug 7, 2025
a7db180
Rename function
Julien-Ben Aug 7, 2025
52b8662
Lint
Julien-Ben Aug 7, 2025
e465582
wip: Initial changes
MaciejKaras Aug 1, 2025
8a4e4b7
merge redesign-pipeline branch
MaciejKaras Aug 6, 2025
5bfacf6
Fixes after merging remote branch
MaciejKaras Aug 6, 2025
9733b45
Add sign option + change staging registries
MaciejKaras Aug 6, 2025
5ab9c08
Add agent and ops-manager to build_info.json
MaciejKaras Aug 6, 2025
e6d67ca
Fix issue with scenario
MaciejKaras Aug 6, 2025
7a34092
Fix for `build_info` computation
MaciejKaras Aug 7, 2025
a71ccf6
Pipeline fixes
MaciejKaras Aug 7, 2025
3be7731
Remove `all-agents` option
MaciejKaras Aug 7, 2025
1aae28b
Add missing `--sign` option
MaciejKaras Aug 7, 2025
e00b0e3
Fix agent matrix build
MaciejKaras Aug 7, 2025
f894e5b
Disable concurrent builds
MaciejKaras Aug 7, 2025
b140220
Move all env vars to constants.py
MaciejKaras Aug 7, 2025
7b5a064
Remove `operator-quick` image build process
MaciejKaras Aug 7, 2025
8df2ce4
Rebase fix
MaciejKaras Aug 7, 2025
b6b05aa
Add release scenarios for agent and ops-manager
MaciejKaras Aug 7, 2025
c5ad3c5
merge from Julien branch
MaciejKaras Aug 8, 2025
031dd5b
Merge branch 'master' into julienben/redesign-pipeline
Julien-Ben Aug 8, 2025
8183ec5
Fix release_info.py structure
MaciejKaras Aug 8, 2025
e7ab93b
Merge branch 'julienben/redesign-pipeline' into maciejk/use-ar-relate…
MaciejKaras Aug 8, 2025
2ec7587
Explicitly push to ECR with latest tag. Staging as a followup
Julien-Ben Aug 8, 2025
1badff0
Ensure builder in main to fix race conditions
Julien-Ben Aug 8, 2025
9e2815a
Log line
Julien-Ben Aug 8, 2025
e17b323
Remove unused is_running_in_evg_pipeline
Julien-Ben Aug 8, 2025
075fcae
Typo from merge conflict
Julien-Ben Aug 8, 2025
afc9b79
Follow up TODO
Julien-Ben Aug 8, 2025
3ef9e2c
Login for garasign image
Julien-Ben Aug 8, 2025
d2a6153
Handle builder creation race condition with an exception
Julien-Ben Aug 8, 2025
c6fc163
Cleanup ensure
Julien-Ben Aug 8, 2025
347b44b
Revert "Handle builder creation race condition with an exception"
Julien-Ben Aug 8, 2025
e2a4126
Revert "Cleanup ensure"
Julien-Ben Aug 8, 2025
715c4ad
Rename trace
Julien-Ben Aug 8, 2025
e117f79
Merge branch 'julienben/redesign-pipeline' into maciejk/use-ar-relate…
MaciejKaras Aug 8, 2025
2125cb7
Remove comment
Julien-Ben Aug 8, 2025
d047de5
Merge branch 'julienben/redesign-pipeline' into maciejk/use-ar-relate…
MaciejKaras Aug 8, 2025
c8b66fe
Merge branch 'master' into maciejk/use-ar-related-versions
MaciejKaras Aug 8, 2025
fa9c7ee
Review fixes
MaciejKaras Aug 11, 2025
e56591c
Merge branch 'master' into maciejk/use-ar-related-versions
MaciejKaras Aug 11, 2025
597edf2
Added comment to get_version_id() method
MaciejKaras Aug 11, 2025
857f705
Revert parallel `max_workers = 1`
MaciejKaras Aug 11, 2025
59e4420
Agent image fix
MaciejKaras Aug 11, 2025
2eebf0f
Merge branch 'master' into maciejk/use-ar-related-versions
MaciejKaras Aug 11, 2025
bec8626
Merge branch 'master' into maciejk/use-ar-related-versions
MaciejKaras Aug 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .evergreen-functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,43 @@ functions:
- ${workdir}

pipeline:
- *switch_context
- command: shell.exec
type: setup
params:
shell: bash
script: |
# Docker Hub workaround
# docker buildx needs the moby/buildkit image when setting up a builder so we pull it from our mirror
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
docker buildx inspect --bootstrap
- command: ec2.assume_role
display_name: Assume IAM role with permissions to pull Kondukto API token
params:
role_arn: ${kondukto_role_arn}
- command: shell.exec
display_name: Pull Kondukto API token from AWS Secrets Manager and write it to file
params:
silent: true
shell: bash
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
script: |
set -e
# use AWS CLI to get the Kondukto API token from AWS Secrets Manager
kondukto_token=$(aws secretsmanager get-secret-value --secret-id "kondukto-token" --region "us-east-1" --query 'SecretString' --output text)
# write the KONDUKTO_TOKEN environment variable to Silkbomb environment file
echo "KONDUKTO_TOKEN=$kondukto_token" > ${workdir}/silkbomb.env
- command: subprocess.exec
retry_on_failure: true
type: setup
params:
shell: bash
<<: *e2e_include_expansions_in_env
working_dir: src/github.com/mongodb/mongodb-kubernetes
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name}

# TODO: CLOUDP-335471 ; once all image builds are made with the new atomic pipeline, remove the following function
legacy_pipeline:
- *switch_context
- command: shell.exec
type: setup
Expand Down
28 changes: 14 additions & 14 deletions .evergreen-periodic-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ variables:
tasks:
- name: periodic_build_operator
commands:
- func: pipeline
- func: legacy_pipeline
vars:
image_name: operator-daily

Expand All @@ -35,49 +35,49 @@ tasks:

- name: periodic_build_init_appdb
commands:
- func: pipeline
- func: legacy_pipeline
vars:
image_name: init-appdb-daily

- name: periodic_build_init_database
commands:
- func: pipeline
- func: legacy_pipeline
vars:
image_name: init-database-daily

- name: periodic_build_init_opsmanager
commands:
- func: pipeline
- func: legacy_pipeline
vars:
image_name: init-ops-manager-daily

- name: periodic_build_database
commands:
- func: pipeline
- func: legacy_pipeline
vars:
image_name: database-daily

- name: periodic_build_sbom_cli
commands:
- func: pipeline
- func: legacy_pipeline
vars:
image_name: cli

- name: periodic_build_ops_manager_6
commands:
- func: pipeline
- func: legacy_pipeline
vars:
image_name: ops-manager-6-daily

- name: periodic_build_ops_manager_7
commands:
- func: pipeline
- func: legacy_pipeline
vars:
image_name: ops-manager-7-daily

- name: periodic_build_ops_manager_8
commands:
- func: pipeline
- func: legacy_pipeline
vars:
image_name: ops-manager-8-daily

Expand All @@ -91,15 +91,15 @@ tasks:
exec_timeout_secs: 43200
commands:
- func: enable_QEMU
- func: pipeline
- func: legacy_pipeline
vars:
image_name: mongodb-agent-daily

- name: periodic_build_agent_1
exec_timeout_secs: 43200
commands:
- func: enable_QEMU
- func: pipeline
- func: legacy_pipeline
vars:
image_name: mongodb-agent-1-daily

Expand All @@ -123,19 +123,19 @@ tasks:
- name: periodic_build_community_operator
commands:
- func: enable_QEMU
- func: pipeline
- func: legacy_pipeline
vars:
image_name: mongodb-kubernetes-operator-daily

- name: periodic_build_readiness_probe
commands:
- func: pipeline
- func: legacy_pipeline
vars:
image_name: readinessprobe-daily

- name: periodic_build_version_upgrade_post_start_hook
commands:
- func: pipeline
- func: legacy_pipeline
vars:
image_name: operator-version-upgrade-post-start-hook-daily

Expand Down
24 changes: 12 additions & 12 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ tasks:
- func: setup_building_host
- func: quay_login
- func: setup_docker_sbom
- func: pipeline
- func: legacy_pipeline
vars:
image_name: operator
include_tags: release
Expand All @@ -297,7 +297,7 @@ tasks:
- func: setup_building_host
- func: quay_login
- func: setup_docker_sbom
- func: pipeline
- func: legacy_pipeline
vars:
image_name: init-appdb
include_tags: release
Expand All @@ -310,7 +310,7 @@ tasks:
- func: setup_building_host
- func: quay_login
- func: setup_docker_sbom
- func: pipeline
- func: legacy_pipeline
vars:
image_name: init-database
include_tags: release
Expand All @@ -323,7 +323,7 @@ tasks:
- func: setup_building_host
- func: quay_login
- func: setup_docker_sbom
- func: pipeline
- func: legacy_pipeline
vars:
image_name: init-ops-manager
include_tags: release
Expand All @@ -336,7 +336,7 @@ tasks:
- func: setup_building_host
- func: quay_login
- func: setup_docker_sbom
- func: pipeline
- func: legacy_pipeline
vars:
image_name: agent
include_tags: release
Expand All @@ -350,7 +350,7 @@ tasks:
- func: setup_building_host
- func: quay_login
- func: setup_docker_sbom
- func: pipeline
- func: legacy_pipeline
vars:
image_name: agent-pct
include_tags: release
Expand Down Expand Up @@ -395,7 +395,7 @@ tasks:
commands:
- func: clone
- func: setup_building_host
- func: pipeline
- func: legacy_pipeline
vars:
image_name: agent-pct
skip_tags: release
Expand All @@ -410,7 +410,7 @@ tasks:
commands:
- func: clone
- func: setup_building_host
- func: pipeline
- func: legacy_pipeline
vars:
image_name: agent-pct
skip_tags: release
Expand All @@ -423,15 +423,15 @@ tasks:
- func: build_multi_cluster_binary
- func: pipeline
vars:
image_name: test
image_name: meko-tests

- name: build_mco_test_image
commands:
- func: clone
- func: setup_building_host
- func: pipeline
vars:
image_name: mco-test
image_name: mco-tests

- name: build_operator_ubi
commands:
Expand Down Expand Up @@ -554,7 +554,7 @@ tasks:
- func: setup_building_host
- func: quay_login
- func: setup_docker_sbom
- func: pipeline
- func: legacy_pipeline
vars:
image_name: database

Expand All @@ -573,7 +573,7 @@ tasks:
- func: setup_building_host
- func: quay_login
- func: setup_docker_sbom
- func: pipeline
- func: legacy_pipeline
vars:
image_name: ops-manager
include_tags: release
Expand Down
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ operator: configure-operator build-and-push-operator-image

# build-push, (todo) restart database
database: aws_login
@ scripts/dev/run_python.sh pipeline.py --include database
@ scripts/dev/run_python.sh scripts/release/pipeline_main.py database

readiness_probe: aws_login
@ scripts/dev/run_python.sh pipeline.py --include readiness-probe
@ scripts/dev/run_python.sh scripts/release/pipeline_main.py readiness-probe

upgrade_hook: aws_login
@ scripts/dev/run_python.sh pipeline.py --include upgrade-hook
@ scripts/dev/run_python.sh scripts/release/pipeline_main.py upgrade-hook

# ensures cluster is up, cleans Kubernetes + OM, build-push-deploy operator,
# push-deploy database, create secrets, config map, resources etc
Expand All @@ -90,7 +90,7 @@ full: build-and-push-images

# build-push appdb image
appdb: aws_login
@ scripts/dev/run_python.sh pipeline.py --include appdb
@ scripts/dev/run_python.sh scripts/release/pipeline_main.py --include appdb

# runs the e2e test: make e2e test=e2e_sharded_cluster_pv. The Operator is redeployed before the test, the namespace is cleaned.
# The e2e test image is built and pushed together with all main ones (operator, database, init containers)
Expand Down Expand Up @@ -154,19 +154,19 @@ aws_cleanup:
@ scripts/evergreen/prepare_aws.sh

build-and-push-operator-image: aws_login
@ scripts/dev/run_python.sh pipeline.py --include operator-quick
@ scripts/dev/run_python.sh scripts/release/pipeline_main.py operator

build-and-push-database-image: aws_login
@ scripts/dev/build_push_database_image

build-and-push-test-image: aws_login build-multi-cluster-binary
@ if [[ -z "$(local)" ]]; then \
scripts/dev/run_python.sh pipeline.py --include test; \
scripts/dev/run_python.sh scripts/release/pipeline_main.py test; \
fi

build-and-push-mco-test-image: aws_login
@ if [[ -z "$(local)" ]]; then \
scripts/dev/run_python.sh pipeline.py --include mco-test; \
scripts/dev/run_python.sh scripts/release/pipeline_main.py mco-test; \
fi

build-multi-cluster-binary:
Expand All @@ -181,27 +181,27 @@ build-and-push-images: build-and-push-operator-image appdb-init-image om-init-im
build-and-push-init-images: appdb-init-image om-init-image database-init-image

database-init-image:
@ scripts/dev/run_python.sh pipeline.py --include init-database
@ scripts/dev/run_python.sh scripts/release/pipeline_main.py init-database

appdb-init-image:
@ scripts/dev/run_python.sh pipeline.py --include init-appdb
@ scripts/dev/run_python.sh scripts/release/pipeline_main.py init-appdb

# Not setting a parallel-factor will default to 0 which will lead to using all CPUs, that can cause docker to die.
# Here we are defaulting to 6, a higher value might work for you.
agent-image:
@ scripts/dev/run_python.sh pipeline.py --include agent --all-agents --parallel --parallel-factor 6
@ scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel --parallel-factor 6 agent

agent-image-slow:
@ scripts/dev/run_python.sh pipeline.py --include agent --parallel-factor 1
@ scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel-factor 1 agent

operator-image:
@ scripts/dev/run_python.sh pipeline.py --include operator
@ scripts/dev/run_python.sh scripts/release/pipeline_main.py operator

om-init-image:
@ scripts/dev/run_python.sh pipeline.py --include init-ops-manager
@ scripts/dev/run_python.sh scripts/release/pipeline_main.py init-ops-manager

om-image:
@ scripts/dev/run_python.sh pipeline.py --include ops-manager
@ scripts/dev/run_python.sh scripts/release/pipeline_main.py ops-manager

configure-operator:
@ scripts/dev/configure_operator.sh
Expand Down
Loading