Skip to content

Commit 8a156c9

Browse files
authored
Use architecture suffix for all tags that are built (#561)
# Summary Previously our `build_test_image_arm` task built not only `-arm64` suffixed task, but also the normal one. This overwritten the default amd64 image tag with arm64 tag and made some other tests fails. <img width="685" height="211" alt="Screenshot 2025-10-29 at 13 31 39" src="https://github.com/user-attachments/assets/82fd166b-b28f-4d1f-94a8-151cbd0863cc" /> ## Proof of Work [Building](https://spruce.mongodb.com/version/69020a21047bfd0007b3897b/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC) arm64 now publishes all tags suffixed with `-arm64` and we have separate tag for regular amd64 (no suffix). <img width="690" height="245" alt="Screenshot 2025-10-29 at 13 54 41" src="https://github.com/user-attachments/assets/4c6b6a73-fe23-43a7-b8c1-4154d1e3ff50" /> ## Checklist - [x] Have you linked a jira ticket and/or is the ticket in the title? - [x] Have you checked whether your jira ticket required DOCSP changes? - [x] Have you added changelog file? - use `skip-changelog` label if not needed - refer to [Changelog files and Release Notes](https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes) section in CONTRIBUTING.md for more details
1 parent 0af0efd commit 8a156c9

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

scripts/release/atomic_pipeline.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,20 @@ def build_image(
7777
# Build the image once with all repository tags
7878
tags = []
7979
for registry in registries:
80-
tag = f"{registry}:{build_configuration.version}"
80+
arch_suffix = ""
81+
if build_configuration.architecture_suffix and len(build_configuration.platforms) == 1:
82+
arch_suffix = f"-{build_configuration.platforms[0].split("/")[1]}"
83+
84+
tag = f"{registry}:{build_configuration.version}{arch_suffix}"
8185
if build_configuration.skip_if_exists and check_if_image_exists(tag):
8286
logger.info(f"Image with tag {tag} already exists. Skipping it.")
8387
else:
8488
tags.append(tag)
8589
if build_configuration.latest_tag:
86-
tags.append(f"{registry}:latest")
90+
tags.append(f"{registry}:latest{arch_suffix}")
8791
if build_configuration.olm_tag:
8892
olm_tag = create_olm_version_tag(build_configuration.version)
89-
tags.append(f"{registry}:{olm_tag}")
90-
if build_configuration.architecture_suffix and len(build_configuration.platforms) == 1:
91-
arch = build_configuration.platforms[0].split("/")[1]
92-
tags.append(f"{tag}-{arch}")
93+
tags.append(f"{registry}:{olm_tag}{arch_suffix}")
9394

9495
if not tags:
9596
logger.info("All specified image tags already exist. Skipping build.")

0 commit comments

Comments
 (0)