Re: Unable to use instanceOf on workflow/pipeline class

2016-02-17 Thread Rinaldo DiGiorgio
Thank you. On Wednesday, February 17, 2016 at 9:08:24 AM UTC-5, Rinaldo DiGiorgio wrote: > > Hi, > > I want to extract all the scm actions from the build. I use the following > groovy code > > build.allActions.each { item -> > actions = item > println "ACTIONS: ${actions.class}" > if

Re: Unable to use instanceOf on workflow/pipeline class

2016-02-17 Thread Baptiste Mathus
In general, don't use instanceof for classes coming from different classloaders. You can use string comparisons between classnames (theClass.getName()). Cheers Le 17 févr. 2016 3:08 PM, "Rinaldo DiGiorgio" a écrit : > Hi, > > I want to extract all the scm actions from the build. I use the follo

Unable to use instanceOf on workflow/pipeline class

2016-02-17 Thread Rinaldo DiGiorgio
Hi, I want to extract all the scm actions from the build. I use the following groovy code build.allActions.each { item -> actions = item println "ACTIONS: ${actions.class}" if ( actions instanceof org.jenkinsci.plugins.workflow.steps.scm.MultiSCMRevisionState) { .. The above produc