Sonar report can't show in Bitbucket when Integrate

Tools info:
SonarQube >> Enterprise Edition & 9.7
Sonar Scanner plugin>> 2.14
BitBucket >> 7.17.4

I’m trying to automate the sonar report to Bitbucket

1.Generated a personal access token with admin credentials in BitBucket.
2.Configured this personal access token and bitbucket URL in SonarQube >> Administration >> Devops platform integration
3.Set up multi-pipeline as tutorial to analyze PR

Result: All branch can analyze and show pull request in Sonar, but no report import to Bitbucket

1 Like


Welcome to the community!

When you check your Bitbucket connection (Administration → DevOps Platform Integrations → Bitbucket), does it come back come back green/valid?

Is there anything in your server logs, particularly ce.log?


Thanks for your reply. I just check the log and found all success, but I think the issue maybe the account . The ce.log shows the submitter is admin(sonar admin).
I’m confused about below context:
“This personal access token is used to report your Quality Gate status to your pull requests. You’ll be asked for another personal access token for importing projects in the following section.”

The account I created is:

  1. A bitbucket admin account and it’s token , then use it in “Devops platform integration”. Then it list the bitbucket project repos after added.
  2. A sonar token for Jenkins ci pipeline

The global setting show like screen, and no sonar record shows in Bitbucket. BTW, Only pull request can link with sonar and show records? While branch commit and multi-pipeline jobs trigger sonar scan then also can’t got sonar records in Bitbucket?



I’m a bit confused. This started with “Sonar report can’t show in Bitbucket…” but your most recent report seems to show exactly that…?



It seems the report can work in Bitbucket, and there is no code change so that Sonar records are null.


So just to follow up, you understand what’s going on and things are working as expected?


Hi Ann,
Make sure Sonar and Bitbucket connection well and sonar scan configuration correct then it is ok. Thanks for your kindly help~

Some tips for user who may also meet similar issue:

  1. check Sonar server logs under: \sonar_ installaion_path\logs
  2. check Bitbucket for Sonar token permission, admin will be better
  3. check Sonar and Bitbucket connection: Administration → DevOps Platform Integrations → Bitbucket
  4. check whether warning and errors: Project settings->Background Tasks
  5. check Sonar token for CI(Jenkins) and Sonar scanner version, sonar9 need java11 above for analysis
1 Like