Sonar Qube is not analysis any other branch than master

we are using SonarQube 8.9 LTS version.
Running different feature branches through TeamCity, analysis successfully. But when going to SonarQube it is still showing only the master branch, not showing up feature branch or develop branch.

Roop Kaur

Hey there.

You’ll want to make sure that the analysis parameter is being passed set to the name of your branch. While not supported by this community, I’m pretty sure the TeamCity SonarQube Plugin handles this automatically.

Thank you Colin.
Now I am passing, it is working.

I have one more question - we are doing branch analysis, but I noticed with LTS8.9 upgrade, we have to run every branch twice which we don’t want. I figured out that we have API where we can set reference branch for feature branches. But my main concern is how I can avoid running new branch twice.
Because at very first time API is erroing out that it doesn’t found the branch, that’s why I have to run again.

Roop Kaur

Hey @roop

Setting the default new code period for your project to Reference Branch will ensure any new branches created automatically use this setting.

This assumes the reference branch is the same for all branches you’ll create, at least by default (it can be changed per-branch later after the first analysis)

1 Like