Container version tagging

Hi there,

Is there a way to force garden use a particular version tag for a container? Alternatively, at least tag it additionally?

I used to be able to do it while still using in-cluster image registry (but only on garden publish calls), but since it did not scale well enough, we moved to an external private registry even for deployments (In-Cluster Building - Garden). Since then, garden publish breaks because of course there is no garden-docker-registry to pull things from.

Therefore the only image tag that I can get right now is the v-{some-garden-generated-hash}, which might have some relation to the git state (when run in CI), but it’s hidden. Therefore given a commit, if I want to get the corresponding image, the only option right now is to check it out and either build again, or get the garden-generated version. Either way, this is not ideal…

One workaround I just thought of but have not yet tried, is project.outputs on the garden side. If we put the generated image versions (which are all different for each module) into the outputs, in the last steps of the CI I could get it as JSON, parse, and then push the tags “manually”. Any other ways to get similar results, preferably easier?

Thanks :slight_smile:

1 Like

Hey Tomas,

Sorry about the late reply, forgot to carry this over from Slack!

A few things to unpack here, but after the discussion I went and came up with this PR: Publish command fixes/improvements by edvald · Pull Request #2250 · garden-io/garden · GitHub

Basically we both fix the issue with garden publish and remote registries, as well as allowing custom tagging in the publish command. I’d be curious to get your feedback on it and see if you think it’ll do the job.


1 Like

Oh, this looks excellent, looking forward to it

1 Like