It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to make Pull Request trigger Sonarqube scan

enduser6 Sep 26, 2017

Hello,

 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

1 vote
Answer accepted
Aron Gombas [Midori] Community Leader Sep 27, 2017
enduser6 Sep 27, 2017

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

Aron Gombas [Midori] Community Leader Sep 28, 2017

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

Jose Ramon Mañes Nov 22, 2018

Hi guys, how´s going on?

I´m having the same needed but in my case I have a SonarQube server and I´m using BB Cloud, do you know if there is any similar plugin or something similar to get the results when someone does a pull request?

 

Regards,

 

Jose Ramon Mañes

Ashish Mathur I'm New Here Jun 07, 2019

I am also having the same scenario but we dont have bitbucket server, so can we still integrate bitbucket with sonarqube

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

3,085 views 1 20
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you