简体   繁体   中英

Does cloudControl have post-deploy hooks?

我正在寻找一种在cloudControl上完成部署后通知外部服务的方法,它们是否具有部署后挂钩,以及如何设置它们?

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM