How to make Pull Request trigger Sonarqube scan


 New to BitBucket... inherited a project, now trying to get up to speed and code-complete ASAP. We have a DevSecOps pipeline using BitBucket as SCM, SonarQube as our static analysis engine. Java is the development language. My Tech Lead would like to prevent a Merge of a Pull request if there are Critical or High issues found in the SonarQube analysis of code in the Pull request. So, I am looking for a way to trigger SonarQube scan on a Pull request and if it fails (Critical issue found) the Merge is not allowed to go through or some notification is sent. There is hope also that issue that pre-existed on the branch would not trigger the notification (legacy issues don't break Merge requests); 

I see plugins for BitBucket that are "pull-request decorators" but they lack documentation (open source ones do, anyway...); any assistance is appreciated. 

1 answer

1 accepted

thanks, Aron. That seems to be the most often recommended plugin to accomplish this. I will pursue it as a solution. 

Glad that it was helpful. Please remember to click the checkmark at the answer so that future viewers see that as the "correct" answer.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

648 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot