Multi branch analysis

We are using a multibranch process with git and bitbucket. What we want to do is to automatically launch sonarQube on all our branches before merging them into master through a Jenkins server.

I’ve already read this documentation https://docs.sonarqube.org/display/SONAR/Branch+Analysis and we have a developer edition of sonarQube.

Is there a way for sonar to auto detect the branch on which it’s running? Or should we always manually change the parameter sonar.branch.name?

Thanks for the help

Hi,

Analysis cannot automatically detect that you’re analyzing a branch, which is why we had to provide parameters so you could make it explicit.

However, I would think that rather than manually changing the value, you should be able to pull it from an env var in your build system…?

Ann

1 Like

Yes it’s possible to retrieve it from our environment. We’ll do it thanks

1 Like