build-metrics-plugin

Skip to end of metadata
Go to start of metadata

This plugin uses the results from the Global Build Stats Plugin to generate some basic build metrics.  It is really useful in combination with the sidebar links plugin.

Plugin Information

Plugin ID build-metrics Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
1.0
Feb 17, 2012
1.398
global-build-stats (version:1.2)
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Maddy Goss (id: javamllama)
Usage Installations 2013-Apr 897
2013-May 949
2013-Jun 979
2013-Jul 1033
2013-Aug 1016
2013-Sep 1072
2013-Oct 1154
2013-Nov 1161
2013-Dec 1144
2014-Jan 1209
2014-Feb 1267
2014-Mar 1301

Requirements 

This plugin requires Jenkins 1.399 or better and the Global Build Stats plugin 1.2 or better.

Installation

To install the build metrics plugin, Go to "Manage Jenkins" -> "Plugin Management". Check the latest version and install.  You will probably need to restart the Jenkins server after that.

How To Use the Plugin

Manage Jenkins Screen

Go to "Manage Jenkins". You should see an icon of Jenkins with a little data grid in front.    Click that and it will take you to the Built Metrics Search screen (see below).

Build Metrics Search Screen

The search screen is where you tell the plugin which jobs you wish to report on and what timeframe should be included in the report.


Configure the following parameters:

  • Search Results Label: set this to whatever text you wish to be displayed at the top of the search results screen. Usually this would be some descriptive text for the build job metrics being summarized.
  • Select the time window: default is 2 weeks (must be an integer)
  • Configure the filters (for more information on this, see the Global Build Stats Plugin configuration since this part of the UI was copied directly from it).

Click Search and the report will be generated and displayed (see Build Metrics Report Screen below)

Build Metrics Report Screen

The build metrics report screen is split into two sections. The top section contains the selected jobs and their associated build metrics.  The bottom section contains a list of failed builds; complete with the job name, a link to the console output of the build, and a link to the build itself as well as a section to display the 'cause' for the build (see description of adding build failure cause below).


Adding a Cause for a build failure

I found it useful to have a description in the report for why the build failed. This way I could see trends as they happened over time.  To add a cause:

  1. Click on the build number link in the failed build list (at the bottom of the build metrics report screen). This will take you to the home screen for the indicated build number.
  2. Click the 'edit description' link (on the right hand side of the page).  Enter a description for the cause of the build failure and click the submit button.
  3. Refresh the build metrics report screen and you will see the cause added to the build failure list.

Intended Use Case

This plugin was created because the team I work on needed to deliver some concise build metrics for our Jenkins builds on a rolling two week iteration. These build metrics needed to have an overall failure rate and an individual one per job, as well as a list of failed builds (with associated causes).  This plugin provides that reporting mechanism.  To be really useful though, we needed to be able to pull it up quickly and easily every time we wanted to generate the report.  I use the sidebar links plugin to accomplish this, by simply copying the url for the build metrics report screen for a given set of search criteria.  I then enter this URL as a sidebar link, using the icon that I created for the plugin and the description (1st parameter on the search page) as the txt of the link.  This way all of our users can just go to the main Jenkins dashboard and pull up the report as needed.  

We currently take the results of the report, copy them into an email and send that to our development teams as a 'report card'.  A great next-step for the use of this plugin would be to have a job that ran the report and emailed out the contents on a scheduled basis.

Labels

Edit
plugin-report plugin-report Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.