SonarQube version: 8.5.0
When the property
sonar.branch.name is not passed when calling SonarQube gradle plugin, expected behaviour is to assume the branch name is
master and set it as main branch in sonar project. This feature works fine when running the plugin locally, but when running it on Jenkins, branch name is autoconfigured. In our case the main branch name is
main and described behaviour causes SonarQube to detect branch as
main and still assume main project branch as
master which leads to following error:
“master” branch has not been analyzed yet and you have multiple branches already. It looks like it is not your Main Branch, check your configuration.
Is there any way to disable autoconfiguration on Jenkins or mark branch as main when running the scanner?