Pull Request decoration (Bitbucket Cloud)

Hi there,

I’m looking for getting our pull-request (bitbucket cloud) being decorated by the pull-request/branches analysis done by SonarQube.

We’re running now SonarQube 7.1 (docker image) + “Developer Edition” license. Despite we were able to get the branches and pull-request analysis/results on the SonarQube portal, I don’t know how we can decorate back into the Bitbucket pull-requests the SonarQube results and quality gate (since in our workflow, and I guess in most of the use cases out there, we’re expecting the gatekeeping process to happen as part of the pull-request process in Bitbucket)

According to this doc: https://docs.sonarqube.org/display/SONAR/Pull+Request+Analysis that feature is not supported by Developer Edition…

The only decoration we have now is being implemented by this plugin:

But, it has some drawbacks:

  • It requires a deprecated parameter “sonar.analysis.mode=issues” to work
  • Using that analysis mode in any case means we cannot use the Branch and PR feature you have introduced. No results available in the SonarQube portal.
  • Test coverage is ignored when decorating the pull-requests / So quality gating just by rules priority

So we’re in a situation were we’re “close to”, but we cannot really close the loop and have SonarQube fully integrated into our pull-request workflow using Bitbucket Cloud.

Any help is more than welcome.
Thanks in advanced!

Hi David,

unfortunately, this is not in our (SonarSource) plans to support the setup “Bitbucket Cloud + SonarQube”. Instead, the target is “Bitbucket Cloud + SonarCloud”.

Out of curiosity: what’s missing on SonarCloud that decided you to host your own SonarQube Developer Edition instance?

1 Like

Hi Fabrice,

So no good news :frowning:
We have been running our hosted instance since time ago… so it was not a decision in terms of Cloud vs hosted. According to the release notes we were expecting from the Developer Edition to manage pull-requests analysis, so we’re currently evaluating a Trial license for this purpose on top of our current infrastructure.

I’ve been reading a little bit about SonarCloud + Bitbucket Cloud integration. Can you please clarify whether or not using Bitbucket pipelines is required to have the pull-request totally supported? (triggering the analysis, having results on Sonar, having pull-request decorated back with Sonar reports…) We’re using Bamboo instead of Bitbucket pipelines.

Can you please point me to documentation about SonarCloud features vs Developer Edition?

Thanks!

Hi David,

I understand. No problem if you’re using Bamboo instead of Pipelines, you will be able to run the analyses and have your pull request decorated in Bitbucket Cloud. It’s just that you will have to do a little bit more manual configuration of your builds to pass the appropriate analysis parameters. See my answer here:

There is no specific doc that lists the differences between SonarCloud and SonarQube Developer Edition. The features are 99% the same, the missing things are (from the top of my head):

  • No custom plugin
  • No custom rule
  • No custom metrics & measures

Is there a place we can view the current plans/roadmap? Preferably with some sort of a time frame so we have an idea when to expect new features.

We don’t have such a page for now, but indeed this is something we should be thinking of. I add this on my todo list :slight_smile:

2 Likes

We are in the same boat since SonarQube 7.0. We ended up running the build twice (once to decorate the PR with a deprecated parameter, the second time to get analysis data updated in SonarQube). This is obviously less than ideal! I’d love to hear if anybody found a better work around.

1 Like

It is unfortunate that PR decoration is not supported with Bitbucket Cloud + Sonar Developer edition. Any plans to have this supported? We wanted to to host SonarSource on-prem due to compliance reasons.