I'm trying to hook a module in so that just before and just after a deployment I can run some custom module code.
I've already found that you can hook into hook_deploy_operation_info() before things are run and in that you can specify preprocess and postprocess functions to call but these are run for each entity and not before/after the whole deployment has completed.
I don't really want or know whether it is worth declaring and running hook_deploy as I don't know enough about that yet.
Also it would be nice if there was a rule event which could be hooked into so that you could run custom rule actions after a deployment had completed (or failed).
Cheers
Comment | File | Size | Author |
---|---|---|---|
#1 | deploy-add-post-deploy-hooks.patch | 745 bytes | badjava |
Comments
Comment #1
badjava CreditAttribution: badjava commentedHere is a patch I wrote for a post-deployment hook that can be implemented using hook_deploy_plan_publish($status) where $status is TRUE or FALSE depending on whether the deploy succeeded or not.
Comment #2
skwashd CreditAttribution: skwashd at Dave Hall Consulting commented@badjava thanks for the patch. This is handy for use cases where
hook_entity_insert()/hook_entity_update()
isn't appropriate.Overall it looks good but before it can be committed we need the hooks to be documented in deploy.api.php.
Comment #3
badjava CreditAttribution: badjava commentedComment #5
skwashd CreditAttribution: skwashd at Dave Hall Consulting for Pfizer, Inc. commented@badjava thanks for the patch. This was reworked on github PR:10 and committed.