Skip to content

Commit 0ebbf11

Browse files
authored
Merge branch 'master' into DEVPROD-19870-part1
2 parents 547dfdb + cda9f73 commit 0ebbf11

18 files changed

+535
-367
lines changed

.evergreen-functions.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -517,30 +517,14 @@ functions:
517517
# docker buildx needs the moby/buildkit image when setting up a builder so we pull it from our mirror
518518
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
519519
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
526-
params:
527-
silent: true
528-
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
536520
- command: subprocess.exec
537521
retry_on_failure: true
538522
type: setup
539523
params:
540524
shell: bash
541525
<<: *e2e_include_expansions_in_env
542526
working_dir: src/github.com/mongodb/mongodb-kubernetes
543-
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name}
527+
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name} ${all_agents}
544528

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

.evergreen.yml

Lines changed: 17 additions & 81 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
@@ -347,19 +347,6 @@ tasks:
347347
image_name: init-ops-manager
348348
include_tags: release
349349

350-
- name: release_agent_operator_release
351-
tags: [ "image_release" ]
352-
allowed_requesters: [ "patch", "github_tag" ]
353-
commands:
354-
- func: clone
355-
- func: setup_building_host
356-
- func: quay_login
357-
- func: setup_docker_sbom
358-
- func: legacy_pipeline
359-
vars:
360-
image_name: agent
361-
include_tags: release
362-
363350
# pct only triggers this variant once a new agent image is out
364351
- name: release_agent
365352
# this enables us to run this variant either manually (patch) which pct does or during an OM bump (github_pr)
@@ -371,8 +358,7 @@ tasks:
371358
- func: setup_docker_sbom
372359
- func: legacy_pipeline
373360
vars:
374-
image_name: agent-pct
375-
include_tags: release
361+
image_name: agent
376362

377363
- name: run_precommit_and_push
378364
tags: ["patch-run"]
@@ -392,48 +378,17 @@ tasks:
392378
working_dir: src/github.com/mongodb/mongodb-kubernetes
393379
binary: scripts/evergreen/precommit_bump.sh
394380

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

438393
- name: build_test_image
439394
commands:
@@ -1334,8 +1289,7 @@ buildvariants:
13341289
variant: init_test_run
13351290
- name: build_init_database_image_ubi
13361291
variant: init_test_run
1337-
- name: build_agent_images_ubi
1338-
variant: init_test_run
1292+
13391293
tasks:
13401294
- name: e2e_custom_domain_task_group
13411295

@@ -1369,8 +1323,7 @@ buildvariants:
13691323
variant: init_test_run
13701324
- name: build_init_database_image_ubi
13711325
variant: init_test_run
1372-
- name: build_agent_images_ubi
1373-
variant: init_test_run
1326+
13741327
run_on:
13751328
- ubuntu2204-small
13761329
tasks:
@@ -1594,6 +1547,8 @@ buildvariants:
15941547
variant: init_test_run
15951548
- name: prepare_and_upload_openshift_bundles_for_e2e
15961549
variant: init_tests_with_olm
1550+
- name: build_agent_images_ubi
1551+
variant: init_test_run
15971552
tasks:
15981553
- name: e2e_kind_olm_group
15991554

@@ -1619,6 +1574,7 @@ buildvariants:
16191574
variant: init_test_run
16201575
- name: build_agent_images_ubi
16211576
variant: init_test_run
1577+
16221578
tasks:
16231579
- name: e2e_kind_olm_group
16241580

@@ -1683,18 +1639,6 @@ buildvariants:
16831639
- name: build_upgrade_hook_image
16841640
- name: prepare_aws
16851641

1686-
- name: init_release_agents_on_ecr
1687-
display_name: init_release_agents_on_ecr
1688-
# this enables us to run this variant either manually (patch) which pct does or during an OM bump (github_pr)
1689-
allowed_requesters: [ "patch", "github_pr" ]
1690-
tags: [ "release_agents_on_ecr" ]
1691-
# We want that to run first and finish asap. Digest pinning depends on this to succeed.
1692-
priority: 70
1693-
run_on:
1694-
- ubuntu2204-large
1695-
tasks:
1696-
- name: release_agents_on_ecr_conditional
1697-
16981642
- name: run_pre_commit
16991643
priority: 70
17001644
display_name: run_pre_commit
@@ -1722,8 +1666,7 @@ buildvariants:
17221666
variant: init_test_run
17231667
- name: build_init_om_images_ubi
17241668
variant: init_test_run
1725-
- name: build_agent_images_ubi
1726-
variant: init_test_run
1669+
17271670
run_on:
17281671
- ubuntu2204-small
17291672
tasks:
@@ -1809,13 +1752,6 @@ buildvariants:
18091752
- name: release_init_database
18101753
- name: release_init_ops_manager
18111754
- name: release_database
1812-
# Once we release the operator, we will also release the init databases, we require them to be out first
1813-
# such that we can reference them and retrieve those binaries.
1814-
# Since we immediately run daily rebuild after creating the image, we can ensure that the init_database is out
1815-
# such that the agent image build can use it.
1816-
- name: release_agent_operator_release
1817-
depends_on:
1818-
- name: release_init_database
18191755

18201756
- name: preflight_release_images
18211757
display_name: preflight_release_images
@@ -1847,13 +1783,13 @@ buildvariants:
18471783

18481784
# It will be called by pct while bumping the agent cloud manager image
18491785
- name: release_agent
1850-
display_name: (Static Containers) Release Agent matrix
1786+
display_name: release_agent
18511787
tags: [ "release_agent" ]
18521788
run_on:
18531789
- release-ubuntu2204-large # This is required for CISA attestation https://jira.mongodb.org/browse/DEVPROD-17780
18541790
depends_on:
1855-
- variant: init_release_agents_on_ecr
1856-
name: '*'
1791+
- variant: init_test_run
1792+
name: build_agent_images_ubi # this ensures the agent gets released to ECR as well
18571793
- variant: e2e_multi_cluster_kind
18581794
name: '*'
18591795
- variant: e2e_static_multi_cluster_2_clusters

.githooks/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ function update_release_json() {
117117
}
118118

119119
function regenerate_public_rbac_multi_cluster() {
120-
if echo "$git_last_changed" | grep -q 'public/tools/multicluster'; then
120+
if echo "$git_last_changed" | grep -q -e 'cmd/kubectl-mongodb' -e 'pkg/kubectl-mongodb'; then
121121
echo 'regenerating multicluster RBAC public example'
122-
pushd public/tools/multicluster
122+
pushd pkg/kubectl-mongodb/common/
123123
EXPORT_RBAC_SAMPLES="true" go test ./... -run TestPrintingOutRolesServiceAccountsAndRoleBindings
124124
popd
125125
git add public/samples/multi-cluster-cli-gitops
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: OpsManager container images not published due to a product bug
3+
kind: other
4+
date: 2025-08-11
5+
---
6+
7+
* We have deliberately not published the container images for OpsManager versions `7.0.16`, `8.0.8`, `8.0.9` and `8.0.10` due to a bug in the OpsManager which prevents MCK customers to upgrade their OpsManager deployments to those versions.

config/manager/manager.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ spec:
162162
value: "quay.io/mongodb/mongodb-agent-ubi:12.0.34.7888-1"
163163
- name: RELATED_IMAGE_AGENT_IMAGE_12_0_35_7911_1
164164
value: "quay.io/mongodb/mongodb-agent-ubi:12.0.35.7911-1"
165-
- name: RELATED_IMAGE_AGENT_IMAGE_13_37_0_9590_1
166-
value: "quay.io/mongodb/mongodb-agent-ubi:13.37.0.9590-1"
165+
- name: RELATED_IMAGE_AGENT_IMAGE_13_38_0_9654_1
166+
value: "quay.io/mongodb/mongodb-agent-ubi:13.38.0.9654-1"
167167
- name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_6_0_26
168168
value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:6.0.26"
169169
- name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_6_0_27

helm_chart/values-openshift.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ relatedImages:
115115
- 108.0.7.8810-1
116116
- 12.0.34.7888-1
117117
- 12.0.35.7911-1
118-
- 13.37.0.9590-1
118+
- 13.38.0.9654-1
119119
mongodbLegacyAppDb:
120120
- 4.2.11-ent
121121
- 4.2.2-ent

inventories/agent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ vars:
33
s3_bucket: s3://enterprise-operator-dockerfiles/dockerfiles/mongodb-agent
44

55
images:
6-
- name: mongodb-agent-ubi
6+
- name: mongodb-agent
77
vars:
88
context: .
99
template_context: docker/mongodb-agent

lib/sonar/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def render(path: str, template_name: str, parameters: Dict[str, str]) -> str:
1313
"""
1414
env = jinja2.Environment(loader=jinja2.FileSystemLoader(path), undefined=jinja2.StrictUndefined)
1515

16-
template = "Dockerfile"
16+
template = "Dockerfile.old"
1717
if template_name is not None:
1818
template = "Dockerfile.{}".format(template_name)
1919

0 commit comments

Comments
 (0)