is there a way to do pulumi preview without it bui...
# general
is there a way to do pulumi preview without it building containers?
👋 1
Possibly - depends on what approach you are taking to the Docker build. You could conditionally create the “Image” on
and then if it is a dryrun(preview) pass a dummy value as the image name instead of the name generated by the Image? (The preview may show a false-positive removal of the Image).
That said - it might be nice to have some more direct way to do this. If you want to open an issue to suggest this - would be good to track.
Alternatively, could this be flipped so that it only builds on preview then only deploys on when
is accepted? Similar to how there is an issue tracking the ability to only apply what was generated during the preview step. So, you run
pulumi update
get the preview, pulumi builds the docker images, then when
is selected, it applies what it did during the preview stage so a change to a dockerfile in between preview and apply won’t change the image.
Only build on preview and deploy on update is the current behavior. With Docker caching I think @great-tomato-45422 is asking to not even build on preview?
It still runs through the steps, just doesn’t actually rebuild due to caching, correct?
And yes, that’s what he is asking.
Technically it always rebuilds both on preview and update - but due to caching both of them should be “fast” if there are not actually any changes.
There are a few issues in related to improvements that we can make around this.
I think this one is most similar to what I was talking about:
Good to know it’s being tracked!
yea my pipeline is generally, build, preview dev/prod/stage then apply dev/prod/stage do some reason my preview step is building again