We setup SonarQube self hosted server and integrated with Bitbucket using sonar document.
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 Atlassian support SonarQube scanner don’t show report in pipeline section
Still issue is not sorted so reached Attlasian support below url can be used for overall conversation as reference.
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.
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
how is SonarQube deployed: zip, Docker, Helm
what are you trying to achieve
what have you tried so far to achieve this
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
Specifically, we need to know your SonarQube version and edition, as well as what you’ve done - explicitly, not just the docs you followed - to accomplish what you’re after.
Additionally, please share your analysis logs.
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension): soanrqube-10.3 developer edition, SonarQube-connector
how is SonarQube deployed: zip
what are you trying to achieve: We are integrating our code base of Bitbucket (SCM and Pipeline both) with Sonarqube for reports.
what have you tried so far to achieve this:
Created OATH key attached Bitbucket project in SonarQube, integrated pipe in bitbucket yaml file.
using Bitbucket Cloud integration
In SonarQube detailed reports are coming but into PR or Pipeline reports are not coming.
Attaching sonarqubelogs.log (17.7 KB)
logs of one of the SonarQube attached repository during pipeline ran
From your log, it looks like a branch analysis is being run, not a PR analysis:
INFO: Detected analysis for branch 'QA'
INFO: Detected branch/PR in 'Bitbucket Pipelines'
INFO: Auto-configuring branch 'QA'
Per the docs analysis in Bitbucket pipelines automatically sets pull request parameters when a PR is recognized. So I’m guessing it was the underlying branch under analysis rather than the PR itself.
Thanks for sharing your pipeline. I’m not an expert in that, but nothing jumps out at me there.
So let’s look server-side. Did you use the in-app wizard to import your projects into SonarQube? If not, you may need to do per-project setup to enable PR decoration.
Also, could you clarify whether this is Bitbucket Server or Cloud?
Since you used the wizard, the project should be properly configured for PR decoration.
So let’s back up a bit.
The question is why a branch pipeline is being run, rather than the PR pipeline. Going back to your pipelines, it looks like the PR pipeline is only triggered when the underlying branch name starts with fix/ or feat. Looking at the screenshot in your initial post, I see an upper-case Feat.
I think it might be useful to try a simplified pipeline with no name restrictions.
Hello G Ann Campbell,
Tried using simplified pipeline with no name restrictions, instead of ‘fix/’ and 'feat/’ used ‘/’.
still reports are not generated.