Leak Period - reference version

Hello,

I am using SonarQube 6.7 LTS and i build my projects with Jenkins.
I tried to set the reference version manually with Jenkins because i want to have the leak period based on the version that is in production (that’s not necessarily the last version i built).
I tried to use the parameter -Dsonar.projectVersion in my MAVEN_OPTS for the build, but i am not sure i understood well how to use this parameter with the documentation.

Does anyone know the process to set the reference version manually in your build for SonarQube ?

Regards

Hi,

Welcome to the community!

What you’re trying to do gets way easier in 8.0. And since 6.7 has a little age on it at this point, you should upgrade at your earliest convenience.

In the meantime, you should know that the sonar.projectVersion parameter sets the version string SonarQube should use for the version under analysis. So you’re not doing with that parameter what you think you are.

To deal with this until your imminent (right? :smiley:) upgrade, log in as a project admin and go to the project’s Activity page. You’ll have controls there there to add a version event to your baseline analysis. Let’s call the version … uhm… how about “BASELINE”. Then you’ll edit the project Leak / New Code period to “BASELINE” and you should be good to go.

 
HTH,
Ann

Thank you very much for your quick and precise answer !

Regards,
Sébastien.