Skip to content

feat: push an image to all registries under a deployment - #277

Merged
NesCh99 merged 2 commits into
mainfrom
feat/push-to-multiregistries
Aug 24, 2026
Merged

feat: push an image to all registries under a deployment#277
NesCh99 merged 2 commits into
mainfrom
feat/push-to-multiregistries

Conversation

@NesCh99

@NesCh99 NesCh99 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the build service to support pushing docker images to multiple container registries by renaming FindRegistryConnection to FindRegistryConnections and iterating over the returned slice of registries. Unit tests were also added to cover these scenarios. The reviewer suggested wrapping the registry loop body in an anonymous function to safely use defer for the logout operation, ensuring reliable cleanup on any exit path.

Comment thread internal/build/service.go

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the build service to support multiple container registries by renaming FindRegistryConnection to FindRegistryConnections and iterating over the retrieved registries to log in, push the artifact, and log out. Unit tests have been added to verify this new behavior. The review feedback highlights a potential runtime panic due to dereferencing the config.ProjectId pointer without a nil check, and suggests pluralizing the error message when no registry connections are found to maintain consistency with the renamed method.

Comment thread internal/build/service.go
Comment thread internal/build/service.go Outdated
Comment thread internal/build/service_test.go Outdated
@NesCh99
NesCh99 requested a lite review from Copilot August 20, 2026 19:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the build flow to support pushing a built Docker image to all container registries associated with a deployment/project, rather than only the first registry returned by the API.

Changes:

  • Update registry lookup to return a list of registries (FindRegistryConnections) instead of a single registry.
  • Update RunBuild to iterate through all registries, handling login/push per-registry, and using the first pushed image URI for the build creation payload.
  • Add unit tests for FindRegistryConnections covering 0/1/many registry responses.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
internal/build/service.go Return multiple registries and push the image to each registry during RunBuild.
internal/build/service_test.go Add coverage for multi-registry responses and the “no registries found” error case.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/build/service.go
@NesCh99
NesCh99 marked this pull request as ready for review August 20, 2026 19:14
@NesCh99
NesCh99 requested a review from Terryda August 20, 2026 19:14
@NesCh99
NesCh99 merged commit c6845b6 into main Aug 24, 2026
8 checks passed
@NesCh99
NesCh99 deleted the feat/push-to-multiregistries branch August 24, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants