Detailed steps to Integrate sonarqube with bitbucket server

Hi,

we using sonarqube developer Trail version 9.1 and bitbucket server version 6.x

I’m not finding any detailed steps in the official page or google.

can someone share the detailed steps to integrate sonarqube with bitbucket in order to achieve pull request decoration

Regards
Kalyan

Hi,

Welcome to the community!

It’s not clear to me whether you’re integrating with BB Cloud or BB Server. Both are documented: Cloud, Server.

 
HTH,
Ann

Hi Ann,

I’m trying to integrate bitbucket server. In the shared document/page there is no steps for how pull request option will be appear in the bitbucket server. Do we need to add/install any plugin in bitbucket server? if yes is that free or paid addon

And in sonar-project.properties file what all details i need to give (like branch,project ,etc…)

Till now what i did

I added my bitbucket details in sonarqube devops platform integration & also i added PAT (personal access token).
I created a project with my repo (in first step it is asking to select the CI Tool i skip this step.)

after this what all i need to do could you please guide/help.
Thanks in advance.

Regards
kalyan

Adding to the above request, i want sonarqube to analyze my code in bitbucket server end whenever i raise a pull request.

Hi,

Did you see this documentation? Bitbucket Server Integration | SonarQube Docs

 
Ann

Hi @ganncamp ,

yes i follow the same steps but the connection is not happening b/w the sonarqube and bitbucket.

what i expecting is whenever i raise a pull request from any branch to any destination branch sonrqube will check the code quality and code analysis.

Regards
kalyan

Hi kalyan,

Do you see any errors in your background task log?

 
Ann

Hi @ganncamp,
to be honest i have zero knowledge on sonarqube even with CI tool.

i dont know where the logs are stored in the backend server.
who will help/assist us for the integration part.
Right now we are in developer trail version if everything works fine we are thinking to purchase the license.

could you please assist someone or share detailed steps to us.

Hi,

I think you’re going to find details of what’s going wrong and/or not happening in your background tasks log.

A little… erm “background” on that: Analysis runs on your CI agent and collects data about your code. It sends that data to the server in a single bundle at the end of analysis. On the server side the bundle is received, queued, and then processed as a “background task”.

If the analysis happened to be of a PR and if PR decoration is configured, at the end of the background task processing, the DevOps server is contacted for PR decoration. So (as I said - I tend to repeat myself :smiley: ) its in the logs of these background tasks that we’ll probably find what’s going on.

To find those logs, you must be a project admin. Then from the project homepage, go to Project Settings → Background Tasks. You see all the tasks, most recent first. For tasks that had errors, the cog menu at the end of the row will give you access (IIRC) to the task log. Scroll to the end to find any errors and bring them back here.

 
Ann

Hi @ganncamp, sorry for troubling you :neutral_face:

please find the backend task details below as a screenshots.

Warnings

Hi,

The information is there in your warnings: some configuration is missing. You should dig into that.

 
Ann