How to make all branches in gitlab project to reflect as same project in sonarqube presently master and its branches are reflecting as different projects in sonar

I am using SonarQube 6.1v,SonarScanner 3.1.0
and in sonarqube analysis i mentioned
for branch specifier i gave master */master for branch */devbranch
I am getting master as a project and branch as different project in sonarqube how to resolve it I need all branches on a single project in SONARQUBE???

branch analysis (several branches in one Sonarqube project) is only available in Developer Edition or higher. The use of sonar.branch property is deprecated in version 6.7, if used it will create a new Sonarqube project per branch, it always worked that way.
Branch Analysis
Analysis parameters
Finally you should consider updating your Sonarqube and SonarScanner versions.
There’s also a branch plugin for SonarQube Community Edition never tried that.

1 Like

thanks for the reply But I tried using sonarqube version 7.1 but unable to get the output can you explain me how to make this happen (several branches in one Sonarqube project) please mention the version to be used (Sonarqube and SonarScanner).

in general you should use at least the current LTS version (6.7.6 right now) or even the newest Sonarqube version (7.6 right now) , to benefit from increased performance, new features and bugfixes.
Also the SonarScanner has already version 3.3.
Once again, to be able to use the branching feature from Sonarsource you will need the Developer Edition or higher (Enterprise …). Alternatively with the Community Edition, you might be able to use
the branch plugin for SonarQube Community Edition - note the compatibility given on the github page. The github readme has “There are currently no usage differences to Branch Plugin.” which means after installing that plugin - don’t know if it really works, as i never used it, we use SQ 7.6 Enterprise - using the property should create a new branch .
A look into the sonarqube documentation might be helpful too:
Branch Analysis look for
Analysis parameters look for sonar.branch

1 Like

Hi Gilbert,

Thanks for the followup…

May I know how in the developer edition can we make sure that the SonarQube analysis is done separately for master as well as its branches in a single project in Sonarqube…

finally I have see
separate analysis for master and separate analysis for branch in same project in SonarQube.

Please provide the procedure and analysis parameters defining.

did you read the documentation for Branch Analysis carefully ?!
You have to use the relevant properties and

1 Like


I have gone through the documentation but sonarqube analysis is done on master and it’s only visible in the dashboard I need even branches to be visible…how to achieve it in community edition???

i can’t help you with the branch plugin for SonarQube Community Edition, i never used it.
Their readme on the github site has:
Project must exists before scanning branches other than master. There are currently no usage differences to Branch Plugin.”
Pluginversion 2.0.0 is said to be compatible with Sonarqube 7.1
So theoretical it should work when using the properties and
If it doesn’t work as expected, you should contact the maintainer or create an issue on the github page.