Long lived branch leak period not respected


(Doug) #1
  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

SonarQube 7.3.0.15553
sonar-scanner-cli 3.2.0.1227

  • what are you trying to achieve

Set the leak period of a long lived branch to a version in the main branch (master).

  • what have you tried so far to achieve this

I have run sonar scanner on my master branch and passed in the project version for its analysis (sonar.projectVersion=1.0.0).

Next I have run sonar scanner on a new branch using the sonar.branch.name=feature/some_branch and sonar.leak.period=1.0.0

Analysis does not respect the sonar.leak.period. Instead it always uses what is configured in the general settings for leak period

Does sonar not allow me to set the leak period to a version in the main branch?


(G Ann Campbell) #2

Hi,

No. You’ll have to pick a date/version/analysis in the long-lived branch to use as that branch’s baseline.

 
Ann


(Doug) #3

Thanks Ann.

I see that I can manually override a long-lived branch leak period in the UI under “Manage branches”. Is there a way to do that via sonar-scanner or the API? When I look at the docs I only see an API key for updating it at the entire project level.


(G Ann Campbell) #4

Hi,

No, you really need to do this through the UI.

Ann