I'm looking for a way to notify external services after a deploy has finished on cloudControl, do they have post-deploy hooks and how are they set up?
Does cloudControl have post-deploy hooks?
40 Views Asked by jaimeiniesta At
2
There are 2 best solutions below
0
On
You can build pre-deploy hooks when using composer.
Register them in your composer.json
https://gist.github.com/sgotre/7706650
And write you commands in a special class. https://gist.github.com/sgotre/7706500
It is good to know these hooks are executed on the build-server. There, you do not have access to DEP_VERSION and other environment variables
While certainly useful in some situations, we unfortunately currently do not support web-hooks.
As a workaround you could notify the external services either by calling a custom script during push or before/after starting of the application processes. The deployed Git hash is always available in the
DEP_VERSIONenvironment variable. Alternatively you can use the events in the deploy logcctrlapp APP_NAME/DEP_NAME log deployto trigger custom actions.