Title: Message Title
Jesse Glick updated an issue
Jenkins / JENKINS-28784
junit-attachments plugin not compatible with Pipeline
Change By:
Jesse Glick
The JUnit-attachments-plugin doesn appear to be compatible with Workflow jobs.Test for reproducing the issue:Create the following Workflow job:{code :groovy }node ('master') { sh ''' mkdir -p test cd test wget http://lazerbrody.typepad.com/photos/uncategorized/2007/03/22/mammy_yokum_broigges.jpg cat << EOF > test.xml [[ATTACHMENT|test/mammy_yokum_broigges.jpg]] For no good reason!EOF''' // step([$class: 'JUnitResultArchiver', testResults: 'test/*.xml']) step([$class: 'JUnitResultArchiver', testDataPublishers: [[$class: 'AttachmentPublisher']], testResults: 'test/*.xml'])}{code}Observed result:{noformat}Started by user thomasRunning: Allocate node : StartRunning on master in /var/lib/jenkins/workspace/WFJUnitPostBuildRunning: Allocate node : Body : StartRunning: Shell Script[WFJUnitPostBuild] Running shell script+ mkdir -p test+ cd test+ wget http://lazerbrody.typepad.com/photos/uncategorized/2007/03/22/mammy_yokum_broigges.jpg--2015-06-07 13:07:51-- http://lazerbrody.typepad.com/photos/uncategorized/2007/03/22/mammy_yokum_broigges.jpgResolving lazerbrody.typepad.com (lazerbrody.typepad.com)... 190.93.247.9, 141.101.115.9, 190.93.245.9, ...Connecting to lazerbrody.typepad.com (lazerbrody.typepad.com)|190.93.247.9|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 18510 (18K) [image/jpeg]Saving to: ‘mammy_yokum_broigges.jpg’ 0K .. 100% 787K=0,02s2015-06-07 13:07:52 (787 KB/s) - ‘mammy_yokum_broigges.jpg.1’ saved [18510/18510]+ catRunning: General Build StepRunning: Allocate node : Body : EndRunning: Allocate node : EndRunning: End of Workflowjava.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.WildcardTypeImpl cannot be cast to java.lang.Class at org.jenkinsci.plugins.workflow.structs.DescribableHelper.coerce(DescribableHelper.java:224) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.mapList(DescribableHelper.java:263) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.coerce(DescribableHelper.java:248) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.buildArguments(DescribableHelper.java:186) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.injectSetters(DescribableHelper.java:308) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.instantiate(DescribableHelper.java:93) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.coerce(DescribableHelper.java:236) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.buildArguments(DescribableHelper.java:186) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.instantiate(DescribableHelper.java:91) at