Sonarqube bitbucket integration - PR Analysis

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

Sonarqube 8.3

  • what are you trying to achieve

https://docs.sonarqube.org/latest/analysis/pr-decoration/
Expand Bitbucket server

Projects created from a Bitbucket Server repository

If you create a project From a Bitbucket Server repository , SonarQube automatically configures your project settings for Pull Request decoration. You will need to provide a Personal Access Token from your user account with Read permissions for both projects and repositories. This Personal Access Token will be stored in SonarQube until you revoke it on the Bitbucket Server side.

I am not sure what Projects created from Bitbucket Server repository means.

  • what have you tried so far to achieve this

I get PR decoration if I go to project Settings > Pull request decoration and set ProjectKey, Project Name. The documentation says the following.

If you create a project From a Bitbucket Server repository , SonarQube automatically configures your project settings for Pull Request decoration.

How do you create a project from Bitbucket Server repository?

Maybe this will help https://dev.to/serializator/sonarqube-pull-requests-in-bitbucket-cloud-188b

Hi @g334,

A picture is worth a thousand words:

You’ll see this screen if you create a new project from within the SonarQube UI by clicking the + button at the upper right corner and choose “Create new project.”

Thank you. I was using jenkins and sonartoken to push analysis to sonarqube. I was absolutely not aware of this option.

Involves using extra plugin. I believe that plugin costs you additional licensing fee.

Using Sonarqube 7.9+ and bitbucket 5.16+, you can integrate them together without additional plugins.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.