is it possible to keep analyses forever? I can only set weeks and days under Administration / General Configuration / Housekeeping. For example, I wish I could turn off sonar.dbcleaner.weeksBeforeDeletingAllSnapshots
completely, or sonar.dbcleaner altogether for that matter.
We are a medical device company and need to be able to keep documentation around for 10 years, this includes code and everything around it including the history of the respective SonarQube project.
While we don’t need to keep every single change, SonarQube doesn’t offer that kind of granularity (and doesn’t need to in my opinion), so turning off these housekeeping features completely seems to be the best compromise I believe.
And in the meantime, yes, cranking those housekeeping settings up is probably your best bet. Either that, or putting an event on every analysis, although at some point even snapshots with events are cleaned out.
The events you can control are version change (sonar.projectVersion) and custom events, which are typically added through the UI, although that could be scripted. This guide may be helpful for that.
And BTW,
Turning off housekeeping will keep every change. At least for a while. (Maybe storing regular DB backups is the answer here?)