tilt icon indicating copy to clipboard operation
tilt copied to clipboard

push extra_tag to registry

Open Raboo opened this issue 2 years ago • 2 comments

Describe the Feature You Want

I want docker_build()'s extra_tag to be pushed to the registry, now it's only the $EXPECTED_REF that is pushed.

Current Behavior

extra_tag is only local, not pushed to registry.

Why Do You Want This?

I want to have tags in the registry that I can revert to and know which tag is the previous. I want to have human readable tag names in the registry. I want to use tilt in a ci pipline that runs for production as well, not just development. For production it's more common to create versioned tags.

Raboo avatar Aug 23 '23 09:08 Raboo

I understand the "release an image" use-case. But i feel like the proposed solution wouldn't work quite right.

For example, in most "release an image" pipelines i've worked with, you only release the image at the last stage, after you've confirmed all the tests pass.

tilt up / tilt ci, on the other hand, just pushes the image whenever it's ready. That's the right behavior for dev and test workflows, but would be pretty weird for release workflows - the image may or may not get pushed based on the results of other builds happening in parellel.

maybe what we really want here is some sort of tilt build [image-name] command that has similar semantics to buildx... like tilt build my-image:v1.0.0 --push that reads the image build spec from the tiltfile

nicks avatar Sep 01 '23 18:09 nicks

Well, I really wouldn't want to have a different set of tools for development and production. I would very much like it to be the same tool. Even thou Tilt is very popular I think Tilt has even bigger potential if the stakeholders behind it would stop seeing it as an tool for only development.

So perhaps an tilt up --prod / tilt ci --prod or tilt ci --release or perhaps boolean in the Tiltfile (this could then be controlled via environment variables). Cause when you push for prod, you still want to apply yaml files, not just build an image.

For me some times I have a separate folder for dev and prod with two separate Tiltfiles. And some times it's the same Tiltfile that applies for dev and prod, but this doesn't work when doing a build, since when building inside Tilt both workloads get the same container image ($EXPECTED_REF).

Other than that, I kind of wonder why the extra_tag even exists, since it's not used except in the local cache.

Raboo avatar Sep 04 '23 09:09 Raboo