问题描述
我想在管道成功完成后触发一个Webhook,我在触发器列表中查看但没有找到任何东西,是否有解决方法可以通过pipeliens手动触发Webhook?
I'd like to trigger a webhook after a pipeline completes successfully, I looked in the trigger list and didn't find any, is there a workaround to trigger webhook manually via pipeliens?
推荐答案
您可以使用更新构建状态触发器,以基于管道构建来触发Webhook.但是,这也将由INPROGRESS或FAILED状态触发,并且无法指定管道.
You can use the Build status updated trigger to trigger a webhook based on a pipelines build. However, this will also be triggered by the INPROGRESS or FAILED state, and there is no possibility to specify a pipeline.
如果您只想从特定管道成功完成时触发Webhook,则可以通过将必要的命令添加到您的 bitbucket-pipelines.yaml
文件中手动进行操作.
If you only want to trigger a webhook from when a specific pipeline completes succesfully, you can do this manually by adding the necessary commands to your bitbucket-pipelines.yaml
file.
如果管道中有多个并行步骤,则应在单独的串行步骤中添加webhook触发器,这样它才在所有并行步骤均已完成时运行.
If you have multiple parallel steps in your pipeline, you should add the webhook trigger in a separate serial step, so it only runs when all parallel steps have completed.
这篇关于管道成功完成后,Bitbucket Webhook触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!