1

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?

jaimeiniesta
  • 156
  • 1
  • 6

2 Answers2

1

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_VERSION environment variable. Alternatively you can use the events in the deploy log cctrlapp APP_NAME/DEP_NAME log deploy to trigger custom actions.

pst
  • 1,414
  • 11
  • 22
1

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

sgotre
  • 405
  • 3
  • 18