Multi branch analysis

branches

(Louis Heche) #1

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


(G Ann Campbell) #2

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


(Louis Heche) #3

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