sonar.projectDate already on first analysis (new project on Sonarqube)

609 views
Skip to first unread message

giusep...@gmail.com

unread,
May 18, 2016, 2:52:35 PM5/18/16
to SonarQube
Given a project and its repository I want to analyse every commit starting from the first one (since the current analysis date can not be older than the last one in the system)

So my scenario is the following one:

The project is not yet created in SonarQube and I create it with the first analysis (the first commit date in the repo)

sonar.projectDate is set with the date of the first commit and Sonar Runner starts. Execution is succesfull but as soon as I try to browse the project on Sonarqube this message is printed:

+++ No analysis has been performed since creation. The only available section is the configuration ++++


Background task does not show any errors.

The point that I do not get is that if I remove the sonar.projectDate property from the procedure above, the message is no more displayed and I can browse the new project with all the results from the analysis.
But this time the date used for tagging this version is the default one (timestamp of the analysis) and not the right one (given that this was the first commit of the project).

In short words my goal is to:
create a new project
from that project analyse it from its first commit until the last one

Any other strategies?

it would be great to get some help

regards

Giuseppe


G. Ann Campbell

unread,
May 18, 2016, 3:07:45 PM5/18/16
to SonarQube, giusep...@gmail.com
Hi Giuseppe,

How long ago was that first commit? I'm betting it's >5 years old.

I know this because I've done exactly the same thing in testing. The thing is that the housekeeping that runs at the end of each analysis deletes all snapshots older than 5 years. Some snapshots younger than that are also deleted. 

Details are available in the docs, and this is configurable, but I have to ask what the benefit of analyzing a >5-year-old commit is. You won't be able to browse your project on a snapshot-by-snapshot basis. Even without the housekeeping routines, not all values produced in the analysis are kept on old snapshots.


Ann
Reply all
Reply to author
Forward
0 new messages