我正在使用新部署fortrabbit.yml文件来触发post commit钩子。之前,git webcall hooks(http://fortrabbit.com/docs/in-depth/git-hooks/webcall)向我提供了有关实际提交的信息。我现在如何(http://fortrabbit.com/docs/in-depth/deployment-file)访问此信息?我想知道提交ID(例如40cede3910db6ba0140993ae0d33376ff5df7483)。提前谢谢!
答案 0 :(得分:1)
新部署 fortrabbit.yml 文件中仍然存在网络共享挂钩。只需使用post-deploy挂钩并设置一个url,如下所示:
post-deploy:
# alternatively/additionally an URL can be specified which is called after
# deployment
url: http://domain.tld/callback
# token which will be send as request header `X-Frbit-Token` to verify that
# the request originated from this post-deploy call (defaults to "unset")
token: your-own-token
在回调中,您会收到提交ID: http://fortrabbit.com/docs/in-depth/git-hooks/webcall#the-callback-url