You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Team,
I have been working on the bitbucket repo for a long time now and have been looking for PR Build validation to integrate with my pipelines exists on Azure DevOps.
Do we have any work-around or out-of-the-box feature where we can resolve this fix?
Problem Statement in detail -
Bitbucket is my code repo and the pipelines are on Azure DevOps. As soon as someone creates a PR - my pull-request pipeline gets triggered on ADO. I am looking for a solution where if my PR build gets failed, team should not have power to merge and complete the PR.
Did someone have faced this earlier? Please help!
Hello @vinod lalwani ,
Welcome to Atlassian Community!
As long as your AzureDevOps builds are reporting their status back to Bitbucket, meaning that you can see the status of your Azure builds on the bitbucket pull requests page, you could leverage Branch permissions to prevent the PR from being merged if the build in the more recent commit has reported a failure.
Among other restrictions you can implement in your repository with branch permissions, one of them is to suggest or require checks before a merge, where you can suggest/enforce specific conditions on merges for individual branches or branch patterns. For your case, there's a specific merge check that would apply: Check for {#} passed builds on the last commit and no failed builds. This merge check will warn/prevent the user from merging the pull request if the last commit in the pull request has failed or has not met the required number of successful builds.
So in this case, you could create a branch permission for the destination branch of your pull requests and enable the merge check above.
Please note that when you select any of these merge checks (and don't have the Premium plan), we'll just warn users when they have unresolved merge checks, but they'll still be able to merge. To prevent users from merging and enforce the completion of all merge checks you would have to upgrade to Premium and select Prevent a merge with unresolved merge checks. Learn more about Premium.
Hope that helps! Let me know in case you have any questions.
Thank you, @vinod lalwani .
Kind regards,
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.