Report with key 'com.sonarsource.sonarqube' has not yet been created

Versions using:

  • SonarQube Developer Edition Version 8.9.6 (build 50800)
  • BitBicket Server 7.17
  • TeamCity Enterprise 2021.1.4

What are you trying to achieve:
Trying to get pull request decoration working.

What have you tried so far to achieve this:

  1. Added SonarQube report in Code Insights settings in BitBucket

  2. PR build triggers in TeamCity upon opening PR in BitBicket

  3. PR build in TeamCity triggers SonarQube build.

  4. SonarQube build finishes successfully, but the status of the build is apparently not communicated back to BitBicket.

  5. Have set Pull Request Decoration settings in SonarQube to point to our BitBucket instance too.

What is not working:
The SonarQube build status is not sent back to BitBucket apparently.

bb-sq-2

Any help is greatly appreciated.

Hey there.

In SonarQube, are there any warnings on the PR analysis?

Hi, thanks for the tip. There was indeed a warning that said “…failed to access BitBucket Server…”. The issue turned out to be because the personal access token added to SonarQube didn’t have access to the repository in BitBucket. Solved the problem by adding the necessary access.

Thank you.

2 Likes

I bumped into this issue also. Can you share the process of adding necessary access for the personal token? Thanks

I bumped into a similar issue. I checked SonarQube to see if there were any warnings. I did encounter one warning.
image (22)
image (23)
I updated the sonar analysis (in my jenkins job) with the appropriate path for the sonar.java.libraries property and it worked.
However, the larger issue still exists.
image
May I know where the report with key ‘com.sonarsource.sonarqube’ is located ?

Hi, perhaps go to Project Settings in SonarQube and see if the BitBucket server (or another git server) info and project info are specified there.
image

Hello samwise ,
I don’t have a PR Decoration tab.

I configured the BitBucket Server, Project Key, Repo Slug in the DevOps Platform Integrations tab

Following can see in PR analysis

  • Pull request decoration didnt happen. Failed to access bitbucket server, the repository or the pull request
  • Dependencies/libraries were not provided for analysis of Source files. The ‘sonar.java.libraries’ property is empty. Verify your configuration, as you might end up with less precise results.

can someone advise to fix the following PR analysis

  • Pull request decoration didnt happen. Failed to access bitbucket server, the repository or the pull request
  • Dependencies/libraries were not provided for analysis of Source files. The ‘sonar.java.libraries’ property is empty. Verify your configuration, as you might end up with less precise results.