I have a repository on bitbucket which initiates a build to run on every change I make to the bitbucket UI like adding reviews, changing description etc. I want the build pipeline to only run when I am updating the code after git commit/ git push.
Hi @Ankita Singh and welcome to the community!
Could you please confirm the following:
If you are using Bitbucket Cloud Pipelines and you have pull-requests definitions for your builds, these builds should run every time a PR is created or new commits are pushed to the PR's source branch. They shouldn't run with any other updates like editing the PR's description, etc. Do you encounter this issue with Bitbucket Cloud Pipelines builds that are configured to run on pull-requests?
If you are using a third-party CI/CD tool, these builds are typically triggered using a Bitbucket webhook, as Saxea _Flowie_ mentioned. A webhook with trigger pullrequest:updated will be triggered with every change in a PR. It is up to the system receiving the webhook payload to examine if there are changes in the PR's commits and trigger a build only in this case and not with any other change.
If you are using a third-party integration that is based on a webhook with trigger pullrequest:updated, you can check if there is any built-in configuration in it to prevent builds for PR changes other than new commits. If such a configuration doesn't exixt, you'll need to reach out to the integration's developers and ask them to provide this functionality or look for a different integration that already has this functionality built in.
Kind regards,
Theodora
The build is typically triggered using a Bitbucket webhook. You can configure the webhook to trigger using the repo:push or pull request update events. Bitbucket will emit an 'update' event for any of the changes you mentioned. It doesn't provide more granular events out of the box though. You could try to set it to repo:push only and see if fits your needs.
Otherwise, we provide an Bitbucket app, Flowie, that adds support for greater flexibility and control to when the builds are triggered. You can use set it to trigger the PR build only when there are code changes and no conflicts, for instance. Or just trigger integration builds once there is a review. If you are interest get in touch support@flowie.app and we are happy to assist you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.