Hi,
My configs:
SonarQube Developer Edition V8.2
Atlassian Bitbucket Server V 6.10.0
I am able to Analyze the PR with decoration, howver I’m getting warnings as: Failed to create Bitbucket Server Quality Report for commit SHA ‘xxxxxx’.
Below is the ce.log with TRACE level:
2020.07.14 07:32:48 DEBUG ce[AXNMBoA-_Fj5MY4cU5iF][c.s.C.D.A.D] Commit that triggered PR analysis: ‘xxxxx’
2020.07.14 07:32:48 DEBUG ce[AXNMBoA-_Fj5MY4cU5iF][c.s.C.D.A.A.C] Unable to contact Bitbucket server: 404 com.atlassian.bitbucket.commit.NoSuchCommitException Commit ‘xxxxx’ does not exist in repository ‘oraclecommerce’.
The above referenced commit has doesn’t exists anywhere in the repository. Is it having any issues with connecting the Bitbucket? Or any setting in the Sonar?
I have integrated the BitBucket Server in the ALM Integration settings with BitBucket URL and Personal Access Token. (Also I have a doubt with which ‘user’ sonar will try to connect Bitbucket - I haven’t mentioned anywhere in the configs)
My Ultimate aim is to block the PR merging when it fails the QG - I have referenced: https://docs.sonarqube.org/8.2/analysis/pr-decoration/ and below block:
Blocking Pull Request merges
*Blocking Pull Request merges is available starting with version 6.9 of Bitbucket Server
After setting up Pull Request analysis, you can block Pull Requests from being merged if they don’t meet your quality standards (if the Quality Gate is failing). To do this:
- From Bitbucket Server, navigate to Repository settings > Code Insights .
- Add a Required report called
com.sonarsource.sonarqube
, select Must pass as the Required status, and Must not have any annotations as the Annotation requirements.
Any help in achieving will be much appreciated. Thanks in Advance - Ariv