We setup SonarQube self hosted server and integrated with Bitbucket using sonar document.
https://docs.sonarsource.com/sonarqube/latest/devops-platform-integration/bitbucket-integration/bitbucket-cloud-integration/
Setup is done using OATH consumer in SonarQube reports are generating but not showing in repos after PR gets merged and in pipeline section.
Verified by using below reference of your FAQ SonarQube scanner don't show report in pipeline section
https://community.atlassian.com/t5/Bitbucket-questions/SonarQube-scanner-don-t-show-report-in-pipeline-section/qaq-p/1890579
Attached screenshots for reference.
Can you please suggest what to do so that reports can be shown in pipeline section and PR merged.
You can connect me on <email_removed_for_privacy>
Hi @Ameer sohail and welcome to the community!
There are two types of reports in Pipelines:
1. Test reporting
This is automatically enabled in your pipeline when it detects JUnit or Maven Surefire XML test results which include a fail. Please note that the Tests tab will only show if you have failed tests to review and it will not show if the tests are successful.
2. Code Insights
This uses our API to upload reports to a certain commit. For these reports to show in a pull request, they need to be uploaded to a commit of the source branch of the pull request (they will not show if the build runs on the merge commit and uploads the report to the merge commit of the PR).
The pipe you are using, sonarsource/sonarqube-scan, is not developed by Atlassian but by SonarSource. Usually, pipes generate the second type of report, but as this pipe is not developed by Atlassian, I am not 100% sure if that is the case.
You can reach out to SonarSource's forum as they provide support for this specific pipe to double-check whether this pipe generates reports and which of the two types of reports:
In case the pipe generates the second type of report, does the commit that this build is running for belong to the source branch of a pull request? If so, can you see the report in the pull request on the right-hand sidebar, in the section Reports?
Kind regards,
Theodora
Hello Theodora,
For your question
does the commit that this build is running for belong to the source branch of a pull request? If so, can you see the report in the pull request on the right-hand sidebar, in the section Reports?
Ans: the commit that this build is running for belong to the source branch of a pull request: Not source branch, its not showing for source branch nor destination PR merge branch.
can you see the report in the pull request on the right-hand sidebar, in the section Reports: No reports are not coming.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ameer,
Thank you for your reply.
I would suggest reaching out to SonarSource's forum https://community.sonarsource.com/tags/c/sq/10/bitbucketcloud to ask whether this pipe indeed generates reports and if so, which of the two types of reports I mentioned in my first post.
In case it does generate reports, you can ask in the forum for help troubleshooting why your reports don't show. This pipe is not developed by Atlassian so I don't have any knowledge of what exactly it does and if this is expected behavior or some configuration issue.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.