I have a problem getting PR decoration working on Bitbucket Server. We are using the following system:
SonarQube Developer Edition v 9.0 (build 45539)
Bitbucket Server v 7.12.1
Bamboo Server v 8.0
Sonar for Bamboo Plugin v 3.0
I want to integrate sonarqube in our CI process and use the Bitbucket integration. I have a problem to get the PR decoration in Bitbucket working.
I have done the steps from the documentation. I have a dedicated SonarQube user in Bitbucket with admin rights and with read rights on the repository.
I have created a token with this user and configured the connection in SonarQube.
When I create a PR in Bitbucket Bamboo starts building and triggers the SonarQube analysis with the Sonar for Bamboo Plugin.
This generates a PR in SonarQube which is analysed correctly. And I can jump from the analysis in Sonarqube directly to the PR in Bitbucket. So the connection between the systems is working. I also see the result of the analysis in the PR in Bitbucket. But the PR decoration is missing.
What I have figured out: If I click on “Show reoprt” on the last screenshot I posted then he tries to open the pull request analysis with a URL beginning with http://localhost:9000/, which does not work.
If I change the http://localhost:9000/ to our sonarqube URL then the link works and I can open the pull request analysis. Is this the problem that this link does not work and so he can´t decorate the pull request?
EDIT: I have solved this problem the ‘Server base URL’ in SonarQube was not set. Opening the report from bitbucket is working now, but decoration still is not working.
finally I could solve the problem. I found an error entry in one log file which said that over 1000 issues can´t be handled (I don´t have the exact entry anymore).
So I tried it with a new project and it worked. I also disabled some rules so that the old project gets under 1000 issues and then it worked too.
So my last question is whether I can change this 1000 issues limit? We plan to add more rules and external reports and propably will get much more issues.