We are planning to get the Bitbucket Server software to install on one of our own server so we downloaded the trial version. One thing we want to do is to be able to put in requirements such as the code must be code-reviewed and unit test before can check in the code, which we believe Microsoft TFS have. Is there similar settings in Bitbucket Server for the code review and unit testing and can you give me a link or steps to do this? I saw that Bitbucket Cloud Premium have the code review option at https://confluence.atlassian.com/bitbucket/bitbucket-cloud-premium-plan-856833380.html . is that also available in Bitbucket Server?
Also saw an article of code review using Crucible and it seems like a separate software at https://www.atlassian.com/software/crucible. Is that another item that we need?
Any help would be greatly appreciated. I needed to make sure I have enough information so I can set up a demo and be able to let them know what software are needed and the pricing.
Yes, Bitbucket Server also allows you to set conditions on your Pull Request (code review) like all reviewers have to approve, minimal successful builds etc. Take a look at Checks for merging pull requests.
You could use Crucible in conjunction with Bitbucket Server, it all depends on how formal you want your code reviews to be, check out this best practice, What's the difference between Crucible and Bitbucket Server? Do I need both? In most cases the pull request model in Bitbucket should be enough.
Hi Mikael,
Thanks for the reply. It seemed that this is a process in Bitbucket for Pull-requests. I don't see any customizable options exception from these 4 options (All reviewers approve, Minimum approvals, Minimum successful builds, No incomplete tasks). Don't see any option to add in unit testing and allow check-in after other processes are done such as Memory Analysis, etc. Currently we are using Microsoft TFS and some of our developers are using the code review and analysis checking prior to pushing their code to our development branch. Docs is at https://docs.microsoft.com/en-us/vsts/tfvc/add-check-policies?view=vsts and https://msdn.microsoft.com/en-us/library/dd264876.aspx .
Bitbucket is a popular GIT repository and having code review, unit testing, etc seems to be standard processes so I am wondering if any other companies are implementing with Bitbucket and can provide information and instructions on how to do it. Thanks
You can either create your own hooks for other processes like Memory Analysis, use Bamboo or Jenkins, or any of the many apps that integrate with Bitbucket.
We are using Jenkins to do all of our builds and tests and is triggered once a user opens up a pull request. They are not able to complete the pr until all of our Jenkins jobs are successful.
You can use the "Minimum successful builds" merge-check to make PRs block on analysis failures such as you mentioned, as long as you have a build script that fails on the same. Setting the minimum threshold to 1 will still block the PR if ANY builds fail.
Despite its name, this merge-check causes ANY build failure to block the PR no matter how many builds are succeeding. (The merge-check should be renamed to "NO FAILED BUILDS ALLOWED AND AT LEAST X NUMBER OF SUCCESSFUL BUILDS REQUIRED").
The "Sonar for Bitbucket Server" paid add-on is also really handy for blocking PR's based on static code analysis.
- Sylvie
(We maintain three paid add-ons: 1. Control Freak, 2. Git Graph for JIRA, 3. Rebase Squash Amend).
It looks like you're new here. Sign in or register to get started.