I would like to do “extra” steps, post publish, th...
# plugins
c
I would like to do “extra” steps, post publish, that depends on details from what was published. A kind of “post rule” hook if you will. Is there a mechanism for this already, or do you have other suggestions for how I may get what I want? More specifically, so is it to notify other parts of our system that a new version of X has been built and published. I’m quite certain we’ll want a custom plugin for this case, but that plugin would still need to be able to fish these details out in some way.. and that some way could perhaps be some form of generic hook-ability into the rule graph during execution, or some such ?
a
I've sort of bodged around this by doing: 1. Use
tags
to store some metadata
helm_chart:foo
2. Generate a list of changed targets
pants --changed-since.... peek > targets.json
3. Do the thing
pants package ... --spec-file=...
4. Use a script after-the-fact to find what you want
[target for target in json.load(open('targets.json')) if has_tag_prefix('helm_chart:', target)]
but maybe a hook wouldn't work for this case either, as I wanted 1 call with an array of 5 items, as opposed to 5 calls of 1 item.