My question is: is there a way to achieve this in Bitbucket? I know that Bitbucket supports webhooks that can be sent when a new comment is created. But how can I leverage this webhook to trigger a pipeline automatically — specifically, how can I configure Bitbucket to send the webhook into itself or otherwise trigger the pipeline based on a comment?
I’ve tried using the API endpoint like this:
but it doesn’t work
this one does work but I cannot add body to webhook on
Repository -> repository settings -> Webhooks
Any guidance on how to set this up? Thanks!
Hi @Kamil Walo
You need to send the webhook to a 'service' that will process and call the API.
You can't do:
Webhook -> Pipeline
You need a 'service' in between.
Webhook -> Service -> Pipeline
This 'service' can be a Bitbucket app, or any HTTP service you deploy that is reachable by Bitbucket.
The closest to 'send the webhook into itself' is to use a Forge app. You can build your own custom app, or use a third party app that already does what you need.
We provide a Bitbucket app, Flowie, that might be useful to what you are trying to achieve. We support triggering pipelines in different ways. Comments are not supported yet, but you can reach to support and depending on your needs we might be able to add it for you.
We have customers that deploy/undeploy to different envs, using labels for instance.
If you need help building your own app, you might try posting your question in the Developer Community too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.