Open plombardi89 opened 7 years ago
@plombardi89 Great suggestion!
I also find it useful for #127.
With a hook/plugin mechanism, I could add a custom script which is run before/after forge build manifests
. Before the build, it will decrypt every secret values so that forge can consume it as usual. After the build, forge doesn't need the decrypted values and therefore the custom script removes the decrypted files.
Btw, thanks for pointing to cookiecutter
. Its plugin system was very inspiring for me.
It would be really nice to be able to add custom code before and after commands. A real world use case of this would be to do something like
istioctl kube-inject
afterforge build ...
orforge deploy ...
. However, other use cases would be to glue in custom code that goes off and does something like send a Slack message or make an API call to another service.Spit balling a bit of implementation I would like to see this work similar to how
cookiecutter
handles hooks: There is a directory calledhooks
which can have an arbitrary executable programs dropped into it. Some consideration will need to make, however, to account for the different commands inforge
and also that there is likely some amount of ordering that needs to be followed.