Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-75091

Plot plugin throws null pointer exception in Pipeline if title not provided

      The plot plugin provides a Pipeline step but the Pipeline step implementation has multiple issues. One of those issues is that a null pointer exception is reported if the plot title is not provided. When a freestyle project leaves the plot title empty, the plot title is not displayed. If a title argument is not provided in the Pipeline step, a null pointer exception is reported.

      The Pipeline that I used to show the problem is

      pipeline {
          agent {
              label 'linux'
          }
      
          stages {
              stage('Hello') {
                  steps {
                      echo 'Hello World'
                      sh '''#!/bin/bash
      [ ! -f plot-a.csv ] && echo "Line-A,Line-B" > plot-a.csv
      let "OTHER_VAR=2*BUILD_ID+1"
      echo $BUILD_ID,$OTHER_VAR >> plot-a.csv
                      '''
                      plot csvFileName: 'plot-923ffed9-0b83-4a7d-93eb-55894c27e904.csv', csvSeries: [[file: 'plot-a.csv']], group: 'Z-group', style: 'line'
                      plot csvFileName: 'plot-923ffed9-0b83-4a7d-93eb-111111111111.csv', csvSeries: [[file: 'plot-a.csv']], group: 'Z-group', style: 'line'
                  }
              }
          }
      }
      

      Run the Pipeline a few times, then click the "Plot" link in the sidepanel and it will report a null pointer exception

          [JENKINS-75091] Plot plugin throws null pointer exception in Pipeline if title not provided

          There are no comments yet on this issue.

            Unassigned Unassigned
            markewaite Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: