Setting default branch on SonarQube

At Medtronic, we use Azure DevOps for our builds and use Sonarqube for static analysis.
In devops, we have sprint branches that is the default branch for 2 weeks. At the end of 2 weeks, a new branch is created for next Sprint and that is the default branch.

For static analysis to be successful, every new sprint, I need to go to Sonarqube and update the default branch name to new Sprint branch name used in DevOps. If the default is set to master on Sonarqube, the static analysis fails saying the reason cannot find the default branch. As static analysis expects default branch names to be same at both places, i am manually updating default branch name in Sonarqube for every new sprint of ours. Can you please look at this and help us resolve the issue.

Hello Shreyas,

I am interested in what your suggestion would be in solving this. This is not generally the chosen approach when using GIT as a version control system. So I’m also a bit curious as why you have decided to choose the approach of creating branch after branch rather than merge to the master branch.

Regards,

Joël

1 Like