Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

See history of Sonar analyses in SonarQube

Tags:

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.

like image 507
jason.zissman Avatar asked Jul 10 '17 16:07

jason.zissman


2 Answers

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)!

like image 62
slartidan Avatar answered Oct 01 '22 06:10

slartidan


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

like image 24
Shawn S Avatar answered Oct 01 '22 06:10

Shawn S