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.
Assuming you have the plugin installed. You can follow these steps:
- Open the job (say TestPlot).
- Click on “Configure” from the Side Bar
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:
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.