Allow specifying config file with cli option (#170) #234
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a config option
--config
which accepts a file path to an alternative configuration file (e.g.chartpress.dev.yaml
). The PR passes all existing tests and adds a few new assertions to test the new code.The use-case I am supporting is alternative chartpress files for different deployment contexts. For example, I have a local development context for a JupyterHub that has a couple extra convenience services, and those need different build arguments for the Hub Docker image. The way that I manage this currently is to temporarily rewrite
chartpress.yaml
with the updated values before calling it, but I would instead like to just load a different configuration file.(The ideal implementation would be something more akin to how you can layer different configs on like you can with Helm values, but that's something I don't really have time to develop.)
After checking the issue lists, I believe this would also close #170