How to configure Plot Plugin in Jenkins?

Plot Plugin is a plugin that plots one or more single values variations across builds in one or more plots. The details of the plugin is available on the jenkins page here. Even though this plugin is very useful it doesn’t have enough resources that illustrates how to configure this plugin for a job. The motivation of this post is to go through the steps to configure this plugin. We will look at how to configure this plugin using csv file.


Steps

Assuming you have the plugin installed. You can follow these steps:

  1. Open the job (say TestPlot).
  2. Click on “Configure” from the Side Bar
SideBar of “TestJob”

3. Add post-build action > Plot build data

4. Fill in the field “Plot group”. This is used to group multiple plots if you have multiple plots under one report.

5. There are bunch of other optional fields like Plot title etc. Which you can fill in based on your need.

6. The important field is “Data series file”. Here you need to fill in the filename that has the plot data. The location of this file is: $JENKINS_ROOT/workspace/TestPlot/. Let’s say the file is: plot-size.csv. The example contents of this file plot-size.csv is:

“size”,”gzippedSize”
10000,1000
10000,1000
75000,12500
60000,10000
50000,8000
18000,5000
12500,1000
305000,40000
270000,32000
120000,20000
100000,16000
68000,11000
8000,800

7. Select “Load data from the csv file”.

8. Save the configuration.

9. Build the job.

You will have to build the job multiple times before you may see the plot. Also, you will have to make sure that in your job you are appending the “plot-size.csv” file with the required data.

If you configuration is correct, you will see the “Plots” option in the Job Home page. Once you have build the job multiple times, you will see the plot in “Plots” section.

Hope this is helpful. Feel free to put in your questions in the comments.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.