Jenkins XUnitPublisher call from pipeline plugin

1,946 views
Skip to first unread message

Павел Песецкий

unread,
Apr 25, 2016, 1:27:24 PM4/25/16
to Jenkins Users
I see that xunit compatibility is supported by pipeline from: https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md#build-steps-and-post-build-actions
But when I try to add the step with:

node('remote') {
step([$class: 'XUnitPublisher', 
types: [
[NUnitJunitHudsonTestType : [pattern: '**/test.xml', skipNoTestFiles: 'false', failIfNotNew: 'true',deleteOutputFiles: 'true', stopProcessingIfError: true]]
],
thresholds: [
[$class: 'FailedThreshold', unstableThreshold: '20']
]

])
}


I get:
java.lang.NullPointerException: The types section is required.
	at org.jenkinsci.plugins.xunit.XUnitProcessor.<init>(XUnitProcessor.java:67)
	at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:141)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:68)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:49)
	at hudson.security.ACL.impersonate(ACL.java:213)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:47)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Where I'm wrong here?

Павел Песецкий

unread,
Apr 28, 2016, 5:22:39 AM4/28/16
to Jenkins Users

Didn\t know that I can use snippet generator for plugin steps:



понедельник, 25 апреля 2016 г., 20:27:24 UTC+3 пользователь Павел Песецкий написал:
Reply all
Reply to author
Forward
0 new messages