Hello,
I am currently using SonarQube 7.9.1 Enterprise Edition.
I have an automatic Jenkins job which will create a new project on Git with 2 branches (master and develop), and then scan the develop branch.
The options given for the scan are:
scannerOptionsMap = [
‘sonar.projectKey’          : pomInfo.POM_GROUPID + “:” + pomInfo.POM_ARTIFACTID,
‘sonar.projectName’         : pomInfo.POM_ARTIFACTID,
‘sonar.projectVersion’      : appVersion,
‘sonar.links.scm’           : inputs.projectRepoGitHttp,
//‘sonar.language’       		: ‘java’,
‘sonar.java.source’         : ‘1.8’,
‘sonar.modules’             : pomInfo.POM_MODULES,
‘sonar.sources’             : ‘src/main/java’,
‘sonar.tests’               : ‘src/test/java’,
‘sonar.junit.reportPaths’   : ‘target/surefire-reports’,
‘sonar.surefire.reportPaths’: ‘target/surefire-reports’,
‘sonar.binaries’            : ‘target/classes’,
‘sonar.java.binaries’       : ‘target/classes’,
‘sonar.buildbreaker.skip’   : ‘true’,
‘sonar.java.coveragePlugin’ : ‘jacoco’,
//‘sonar.jacoco.reportPath’   : ‘target/coverage-reports/jacoco.exec’, ==> N’est plus compatible avec la version de Sonar
‘sonar.coverage.jacoco.xmlReportPaths’ : ‘target/coverage-reports/jacoco-ut/jacoco.xml’,
‘sonar.test.exclusions’     : ‘**/*IT.java’
]
As result the analysis is done by default on a branch called “master” (viewable on my SonarQube interface)
Is there any option to default the branch name to a custom name (in my case develop)?
Thanks