Allow generating CR json separately from building/publishing container images
See original GitHub issueIs your feature request related to a problem? Please describe.
There are at least 2 use-cases when I’d like to generate new CR file for existing and published container images:
- Changing app name in order to be able to deploy it to the same cluster but to a different namespace (we use multiple deployments of the same app for testing purposes).
- Changing something in a
blueprint.conf
without modifying any servlet code (I was trying to come up with a way to generate non-conflicting topic names for multiple deployments in the same cluster before I realized that this is also configurable in non-blueprint configs).
Describe the solution you’d like
It would be nice to have some separate sbt task to generate CR file which will not try to build or publish any container images.
Describe alternatives you’ve considered
Commenting out cloudflowDockerRegistry
in build.sbt
will suppress image publishing to a remote repository. However, images are still built to the local Docker. But the most inconvenient in this case is that the full image name gets changed in the generated CR file: it is no longer prefixed with the registry name. So I have to edit the CR file to replace all image references, which proved to be error prone (see #975).
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
@leozilla at the moment you have multiple possible workarounds, e.g. you can define sbt commands or command aliases to package “defining settings + running tasks” (as it’s done here https://github.com/lightbend/cloudflow/blob/bafe19d3e3b6f3c35c6b5bc752bce8784f6652a8/tools/build.sbt#L182).
We are currently working on a longer-term plan that is very likely going to make this “feature” a byproduct.
This is not mandatory and up to you to enable/disable/workaround if it doesn’t play well with your workflow.
In Cloudflow repo examples you can always e.g.
export CLOUDFLOW_VERSION=xxx
to fix the Cloudflow version: https://github.com/lightbend/cloudflow/blob/master/examples/taxi-ride/project/cloudflow-plugins.sbt#L2