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.
You’ll want to make sure that the sonar.branch.name 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 sonar.branch.name, 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.
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)