Hello, my company is using Enterprise Edition 9.9.1. When analyzing projects via Jenkins, we never send in a sonar.branch.name, rather we must be relying on some auto-branch name detection logic. Currently all of our projects are set up as “Master - Main Branch”, “feature/123”, “feature/234”, “dev”. We only merge to master maybe once a quarter, so it is not being analyzed frequently. We merge to dev almost daily, and I would like it to be considered the main branch.
Without upgrading to v10 to get the “Set as main branch” option (we are a large company and this would take forever), is it possible?
If I manually delete the “dev” branch in the UI, and change the name of Main-Branch to “dev” (or whatever matches the git branch name dev, develop, etc) and then build/analyze the dev branch, will that link the git dev branch to the UI dev-Main Branch?
You could simply begin analyzing dev as main. It will screw up your main history, but…
Alternately, you could rename main to dev. I believe that will get you the same screwed up history as above, but you won’t have to fool around with explicitly setting the branch name in analysis. And in this case, I suppose you would want to delete the real dev.
I suppose you can’t just jump up to 10.7 because your company sticks to the LTAs? In that case, you might like to know that we currently expect the next LTA in January.
Thanks for the response! I have begun the process of deleting the dev branches in the UI, renaming Master to ‘dev’, which sets it as ‘main’, and then kicking off a build to analyze the dev branch. I don’t think I will miss the history, we are still early on in the journey.