Skip to content
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

garden publish does not respect deploymentRegistry #4095

Closed
Walther opened this issue Apr 18, 2023 · 5 comments · Fixed by #4740
Closed

garden publish does not respect deploymentRegistry #4095

Walther opened this issue Apr 18, 2023 · 5 comments · Fixed by #4740

Comments

@Walther
Copy link
Contributor

Walther commented Apr 18, 2023

Bug

Current Behavior

Running garden publish in examples/demo-project, which uses the GCR image registry, results in an attempted push to the docker.io registry

Screenshot 2023-04-18 at 15 59 32

Expected behavior

garden publish should respect the deploymentRegistry configuration and publish the image to the appropriate registry.

Reproducible example

examples/demo-project

Workaround

Suggested solution(s)

Additional context

Originally reported by a customer in a support conversation, more details in internal Slack.

Your environment

  • OS:
  • How I'm running Kubernetes:

garden version

@Walther Walther added the bug label Apr 18, 2023
@jalper jalper moved this to Candidate in Core Weekly Jun 16, 2023
@jalper
Copy link
Contributor

jalper commented Jun 23, 2023

One customer affected by this bug currently is using a workaround where instead of using garden publish they've got a custom shell script that calls AWS commands directly to publish the image tag. This also results in it being much faster since it doesn't need to pull the image down to their machine locally and then re-upload it.

@shumailxyz shumailxyz moved this from Candidate to Todo in Core Weekly Jul 3, 2023
@worldofgeese
Copy link
Contributor

@Walther If you scroll down to Building and pushing images to multiple registries from CI/CD
of this PoC doc, that should function as a solid reproducible example for you 😺

@worldofgeese
Copy link
Contributor

worldofgeese commented Jul 3, 2023

@Walther some more feedback from our client:

They managed to get it working if they manually define the publishId.

But if they try with ${actions.deploy.terraform-registries.outputs.gcp_repository_url}/db-api then it wants to push it to http://docker.io/library/https

They confirm the gcp_repository_url produced from the Terraform outputs is correct: gcp_repository_url = "https://europe-west3-docker.pkg.dev/wolf-chaser-360707/gcp-repository-3c7bc31a"

Here's their Build

kind: Build
type: container
name: dbi-api-gcp
spec:
  publishId: ${actions.deploy.terraform-registries.outputs.gcp_repository_url}/db-api

Should be reproducible with my doc linked in last comment. Let me know if there's any other way I can help!

@vvagaytsev
Copy link
Collaborator

This is re-opened by #6052 that reverted #4740.

@vvagaytsev vvagaytsev reopened this May 17, 2024
@vvagaytsev
Copy link
Collaborator

The publish command should not respect the deployment registry defined in the project-level provider configuration.

The full public image identifier (registry, image name and version tag) should be defined in spec.publishId of the Build-action. This behavior was broken prior to #6050 and was fixed in #6052.

Closing this as not planned.

@vvagaytsev vvagaytsev closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants