jenkinsci / cucumber-living-documentation-plugin

https://plugins.jenkins.io/cucumber-living-documentation/
https://plugins.jenkins.io/cucumber-living-documentation/
MIT License
15 stars 11 forks source link

NullPointerException at CukedoctorPublisher #4

Closed birlibirloque closed 7 years ago

birlibirloque commented 8 years ago

Hi,

I am trying to run a simple pipeline (checkout - build - publisher) with this plugin. The pipeline script is:

node  {
    stage ('Checkout') {
        checkout([$class: 'SubversionSCM',
                                locations: [[credentialsId: '15d0c81b-2be9-45a0-b47b-aca2450c18b9',
                                depthOption: 'infinity',
                                ignoreExternalsOption: true,
                                local: '.',
                                    remote: ****']]])
    }

    stage ('Build') {
        sh '/usr/bin/mvn --batch-mode clean package'
    }

    stage ('Publisher') {
        step([$class: 'CukedoctorPublisher', featuresDir: 'target/surefire-reports/cucumber-json'])
    }
}

But pipeline throws the exception:

[Pipeline] End of Pipeline
java.lang.NullPointerException
        at com.github.cukedoctor.jenkins.CukedoctorPublisher.perform(CukedoctorPublisher.java:150)
        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:213)
        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)
Finished: FAILURE

Environment:

rmpestano commented 7 years ago

Hi @birlibirloque, unfortunately the plugin is not compatible with jenkins 2 pipeline yet.

As an alternative you can use cukedoctor main and exec java -jar in a pipeline step, as commented here.

glibas commented 7 years ago

Hi @rmpestano ,

This is now fixed by #5 and can be closed as well.

Thanks, Glib

rmpestano commented 7 years ago

You're right, thanks for your great work.

It should be available in 1.0.7