Must-share information (formatted with Markdown):
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension): SonarQube 7.9.1 EE, sonar-maven-plugin:184.108.40.2068
what are you trying to achieve:
Hello sonar community,
I’m using sonarQube 7.9.1 EE version for the jenkins multi-branch pipelines. I have a master branch as main branch and release(.*) as long live branches and all private branches as short lived branches which is correct. But, what would be the baseline for the private branches which got created from master and release branches?
I just wanted to know how to define a baseline when I created a private branch pipelines from release and master branches for the following scenarios?
scenario-1: I created a branch1 from master, how can I tell sonar that the baseline should take as master
scenarioe-2: I created a branch2 from release1, how can I tell sonar that the baseline should take as release1
scanerio-3: I created a branch3 from release2, how can I tell sonar that the baseline should take as release2
Currently, I’m passing sonar.branch.target parameter and value as master for the private branches which are getting created from master branch & release1 for the private branches which are getting created from release1 branch & release2 for the private branches which are getting created from release2 branch.
Is this correct what I’m currently doing for multi branch pipelines? if not, what’s the best way to provide baseline?
Also, I currently have “New Code Period” as “previous_version”