On Bitbucket page only 1 sonarqube icon appears though there are 2 scans one mvn and second sonar-scanner against UI components on the same PR

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension):

SonarQube Developer version - 8.9 LTS
Bitbucket version: 7.19.3

  • what are you trying to achieve
  1. Get 2 SonarQube icons on the Bitbucket page corresponding to 2 scans against the same project, one for mvn and second sonar-scanner against UI components
  2. On clicking the SonarQube icon on Bitbucket page, a new window appears and the link from there to bitbucket is wrongly configured to localhost and port corresponding to internal docker network. How to fix that URL to point to sonarqube

For 1 there is no issue viewing the results directly on SonarQube since it shows as 2 different projects, but on bitbucket page the results for second scan for UI only shows up. If I run only first scan the icon correctly show the results for mvn scan. Then it gets overwritten by the UI scan which is run second.

Any ideas on how to achieve both of these.

Thanks
Gopi

Hi Gopi,

I guess you’re talking about the Quality Gate status you can reflect back to Bitbucket Server? This seems related to monorepository analysis which is supported for PRs in Enterprise Edition($$) and above.

But outside of that narrow scope, I think it’s probably normal and expected that multiple anlayses overwrite status.

That said, you should be able to use a Project Badge from each SonarQube project to reflect both Quality Gate statuses side by side.

 
HTH,
Ann

Thanks Ann, I will try Project Badges. Any idea on second question?

  1. On clicking the SonarQube icon on Bitbucket page, a new window appears and the link from there to bitbucket is wrongly configured to localhost and port corresponding to internal docker network. How to fix that URL to point to sonarqube

Hi,

That sounds like a configuration mistake. I would start by checking SonarQube’s Server base URL (Administration → General Settings). If that looks right, I’d check where Bitbucket thinks SonarQube is.

 
HTH,
Ann

1 Like

This is the final solution I was able to adapt:

  1. Get 2 SonarQube icons on the Bitbucket page corresponding to 2 scans against the same project, one for mvn and second sonar-scanner against UI components
    Solution: I ended up combining it into a single scan, that scans both mvn at top level and Javascript/Typescript in the UI folder. Since the results are combined I do not need to worry about 2 icons and overwtiting.
  2. On clicking the SonarQube icon on Bitbucket page, a new window appears and the link from there to bitbucket is wrongly configured to localhost and port corresponding to internal docker network. How to fix that URL to point to sonarqube
    Solution: Ann’s suggestion worked out. I would start by checking SonarQube’s Server base URL (Administration → General Settings)
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.