2

I am trying to learn how to use plot plugin, but I cannot figure out how to read some simple data from a csv file as the chart on the plot section is always empty. I have gone through several threads here in SO but I cannot find what my issue is. This would be the pipeline:

pipeline {
    agent any

    stages {
        stage('Hello') {
            steps {
               echo "test1"
            }
        }
        
        stage('plot') {
            steps{
               plot csvFileName: 'data.csv', csvSeries: [[displayTableFlag: false, exclusionValues: '', file: 'data.csv', inclusionFlag: 'OFF', url: '']], description: 'this is a test plot', group: 'test', style: 'line', title: 'test1' 
            }
        }    
    }
}

and this is the data from the data.csv file:

Alpha,Bravo,Charlie,Delta
1,2,5,20
jesus fernandez
  • 369
  • 1
  • 12

1 Answers1

0

So for anyone coming here. The problem for me was that the path to the csv-file contained relative path (e.g. REPO_ROOT/SubFolder/../data.csv). When I switched it to (hard-coded) relative path to repo root it worked (e.g. REPO_ROOT/SubFolder/data.csv). In addition, you might also find some hints in the issues section for the plot-plugin

djm
  • 83
  • 1
  • 8