Hi,
I am not able to see below such options in branch permission as mentioned in
I am able to see somewhat different and due to that I am not able to have/put merge checks on specific branch for failed builds. I am able to see only the below options under branch permission.
Please help me out
Hi @Rahul,
Welcome to Atlassian Community!
The documentation you are linking to only applies to Bitbucket Cloud, and based on your screenshot it looks like you are on Bitbucket Server/Data Center. Here is the link to branch permissions on Server/DC, https://confluence.atlassian.com/bitbucketserver/using-branch-permissions-776639807.html
Hi @Mikael Sandberg . Thanks for your quick response I really appreciate it. But the link you provided doesn't fulfill my requirement.
Let me explain to you the need and it would be great if you can help me out since its really urgent:
I have a webhook in bitbucket and I am using that to trigger a Jenkins build whenever I get a Pull request in the master branch.
Till here it's working.
Now I want, if the build fails, I simply want to close that merge option in bitbucket, or simply I want that merge option to be disabled for that Pull Request i.e., the merge for the master branch will be allowed only when the build succeeds and if the build fails, merge option to master branch is disabled/closed. (only merging to the master is to be noticed)
The links provided in the Atlassian community for this use case are for Bitbucket cloud and I am unable to get any documentation for this use case for server/DC.
please help
Okay, so you need to configure your merge checks to only allow a merge to happen if you have at least one successful build. In Jenkins you have to use the Bitbucket build status notifier plugin in order to control this. Once you start a build it will notify Bitbucket that a build is in progress, and once finished it will notify that the build is successful or not. You can find more information about merge checks here, Checks for merging pull requests.
Hi @Mikael Sandberg . I really appreciate your valuable time.
I have used that Bitbucket build status plugin and it, in fact, sends the status of the build (either success/fail) to Bitbucket but the problem is the merge checks doc you sent me (https://confluence.atlassian.com/bitbucketserver/checks-for-merging-pull-requests-776640039.html) gets applied to all the pull requests to all branches.
for example, suppose if we have 5 branches and this merge check should happen only to the master branch, and the rest 4 branches(each given to separate developers) are free to create a Pull request and merge freely among themselves.
So concluding it " I want a branch-level merge check like this https://community.atlassian.com/t5/Bitbucket-questions/How-to-prevent-a-merge-when-one-or-more-build-in-pipeline-failed/qaq-p/907393 ". Exactly this same thing I want in my bitbucket server.
I hope you got my use case now.
It's great to find such people like you who are nurturing the wonderful community. Cheers
@Mikael Sandberg
I am really helpless, kindly me out.
It looks like you're new here. Sign in or register to get started.