5

I am triggering a Sonar analysis from Jenkins whenever a user commits any change to any branch of my project. In SonarQube I see the project analysis result, and quality gate status, for the most recently run analysis. It only shows the most recently run analysis for a given project.

How can I see a 'history' of previous analyses that were run prior? Specifically I would like to see the coverage from before and the where in the codebase specific 'critical' issues triggered a quality gate failure. Basically I want a historical snapshot of the 'project overview' page for each time the analysis is run. Since I am triggering the analysis from different branches I need to be able to differentiate an analysis of Branch A vs. a previous analysis of Branch B.

jason.zissman
  • 2,750
  • 2
  • 19
  • 24

2 Answers2

3

If you use SonarQube up to version 5.6: Use the Sonar Timeline Plugin, which allows you to add a graph to your dashboard.

If you use SonarQube version 6.5 or later (to be released in August 2017): Get feature rich history graphs out of the box (no plugin required)!

slartidan
  • 20,403
  • 15
  • 83
  • 131
1

It looks like you have to make a custom dashboard and add a history widget. It looks like it shows you just the times the gate changed (which i guess is what I should have expected) for example the project I tested with only changed status 3 times so even though I asked for 10 columns it only showed 3.

This is on the Sonar homepage for your project, not the sonar widget in jenkins fyi

Shawn S
  • 49
  • 5
  • Thanks! Unfortunately I was hoping for more in-depth information from the analysis, such as where in source code the critical issues appeared, kind of like you see on the project overview page. I just want it recorded historically so I can go back to it later even after subsequent analyses are run. – jason.zissman Jul 10 '17 at 17:07
  • 1
    Good point. I'm surprised that feature doesn't have more information and metadata associated with it. Seeing how that's like the overall general indicator that mgmt looks at. – Shawn S Jul 10 '17 at 17:11