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

NPE using the Plugin in a pipeline

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • last-changes-plugin
    • None
    • Jenkins 2.19.1
      OpenJDK 1.8_102

      The plugin does not work in combination with a standard multibranch pipeline project. I have added a pipeline step for the LastChangesPublisher, which has been suggested by the snippet generator.

      My Jenkinsfile looks like:

      node('master') {
      stage('prep')

      { checkout scm step([$class: 'LastChangesPublisher', format: 'LINE', matchWordsThreshold: '0.25', matching: 'NONE', matchingMaxComparisons: '1000', showFiles: true, synchronisedScroll: true]) }

      }

      My SCM system is Git and configured in the project configuration. As soon as Jenkins reaches the LastChangesPublisher step, the job exists with the following NPE:

      java.lang.NullPointerException
      at com.github.jenkins.lastchanges.LastChangesPublisher.perform(LastChangesPublisher.java:97)
      at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69)
      at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52)
      at hudson.security.ACL.impersonate(ACL.java:221)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

            rmpestano Rafael Pestano
            rabu rabu rabu
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: