You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLOUDP-295785 - Publish agent images to staging repo automatically (#530)
# Summary
Publish agent images to staging repo automatically. Whenever new version
of `agent` appears in the `release.json`, `build_agent_images_ubi` will
build and push it to appropriate registry. For PRs it will appear in the
`dev` registry, but when the commit is merged to master, same
`build_agent_images_ubi` will publish agent image to `staging` registry.
This is possible, because now agent images utilise `skip-if-exists` flag
that makes sure we only build and publish `agent` image that is not yet
published for particular registry, others are skipped.
Renamed `manual_release` scenario to existing `release`.
`manual_release` was only used by `agent` and `ops_manager` release
process and was unnecessary distinction from release scenario. This also
helps to run `agent` and `ops_manager` release tasks from EVG, because
`evg_private_context` was not aware of `manual_release` scenario:
https://github.com/mongodb/mongodb-kubernetes/blob/7f864b2d76b5930596bb0ba08bb30bbe5ab6c087/scripts/dev/contexts/evg-private-context#L121-L153
## Proof of Work
[publish_om80_images](https://spruce.mongodb.com/version/68ee0f864be8200008a07a82/tasks?page=0&sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC&variant=%5Epublish_om80_images%24)
was triggered manually. No images were published, because all of them
exist already in quay.io/mongodb registry. The build scenario however
was properly inferred as `release`
>[2025/10/14 10:58:08.340] INFO 2025-10-14 08:58:08,340 [pipeline]
Building image: ops-manager
[2025/10/14 10:58:08.340] INFO 2025-10-14 08:58:08,340 [pipeline] Build
configuration: ImageBuildConfiguration(scenario=<BuildScenario.RELEASE:
'release'>, version='8.0.14', latest_tag=False, olm_tag=True,
registries=['quay.io/mongodb/mongodb-enterprise-ops-manager-ubi'],
dockerfile_path='docker/mongodb-enterprise-ops-manager/Dockerfile',
platforms=['linux/amd64'], sign=False, skip_if_exists=True,
parallel=False, parallel_factor=0, all_agents=False,
currently_used_agents=False)
[2025/10/14 10:58:08.340] INFO 2025-10-14 08:58:08,340
[image_build_process] Ensuring buildx builder 'multiarch' exists...
[2025/10/14 10:58:16.775] INFO 2025-10-14 08:58:16,774
[image_build_process] Created new buildx builder: multiarch
[2025/10/14 10:58:17.358] INFO 2025-10-14 08:58:17,358 [atomic_pipeline]
Image with tag quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:8.0.14
already exists. Skipping it.
[2025/10/14 10:58:17.358] INFO 2025-10-14 08:58:17,358 [atomic_pipeline]
All specified image tags already exist. Skipping build.
>[2025/10/14 10:59:14.284] INFO 2025-10-14 08:59:14,284 [pipeline]
Building image: agent
[2025/10/14 10:59:14.284] INFO 2025-10-14 08:59:14,284 [pipeline] Build
configuration: ImageBuildConfiguration(scenario=<BuildScenario.RELEASE:
'release'>, version=None, latest_tag=False, olm_tag=True,
registries=['quay.io/mongodb/mongodb-agent-ubi',
'quay.io/mongodb/mongodb-agent'],
dockerfile_path='docker/mongodb-agent/Dockerfile',
platforms=['linux/arm64', 'linux/amd64', 'linux/s390x',
'linux/ppc64le'], sign=False, skip_if_exists=True, parallel=True,
parallel_factor=0, all_agents=False, currently_used_agents=False)
[2025/10/14 10:59:14.284] INFO 2025-10-14 08:59:14,284
[image_build_process] Ensuring buildx builder 'multiarch' exists...
[2025/10/14 10:59:18.493] INFO 2025-10-14 08:59:18,493
[image_build_process] Created new buildx builder: multiarch
[2025/10/14 10:59:18.493] 2025-10-14 08:59:18,493 -
scripts.release.agent.detect_ops_manager_changes - INFO - === Detecting
OM Mapping Changes (Local vs Base) ===
[2025/10/14 10:59:18.496] INFO 2025-10-14 08:59:18,496 [atomic_pipeline]
building agents for changed OM versions
[2025/10/14 10:59:18.496] INFO 2025-10-14 08:59:18,496 [atomic_pipeline]
No changes detected, skipping agent build
## Checklist
- [ ] Have you linked a jira ticket and/or is the ticket in the title?
- [ ] Have you checked whether your jira ticket required DOCSP changes?
- [ ] 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
0 commit comments