On Friday, October 14, 2016 at 1:47:24 PM UTC+1, Daniel Beck wrote:
> > On 14.10.2016, at 13:25, Jonathan Hodgson <j.r.h...@gmail.com 
> <javascript:>> wrote: 
> > 
> > All I've done is move that one line, and for the record at the moment 
> it's being called without OSX being active, so nothing inside that first if 
> statement is being executed (though it shouldn't cause any problems even if 
> its was) 
> > 
> > I'm confused, and frustrated. Any help greatly appreciated. 
> The last statement in a Groovy method is the implicit return value. `find` 
> returns a LinkedHashMap$Entry, it gets returned from the method call, and 
> it breaks due to CPS serialization. 
> Thanks Daniel, I'm still finding my feet with Groovy, throw in the CPS 
issues plus other pipeline job problems (e.g. the lack of working file 
parameters) and I find myself going round and round until I don't know 
which way is up, down or sideways.

Changing things to

@NonCPS def isPlatformActive(platform, active_builds)
    found = (null != active_builds[platform].find { it.value == true } )

Seems to have fixed this issue

> Regarding the regression, likely due to 
> https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Groovy+Plugin#PipelineGroovyPlugin-2.14%28Sep07%2C2016%29
Thanks again.

It's the lack of consistency which is driving me nuts, things work in one 
place, but not another, or they work with one version, but not the next. It 
makes debugging so hard. 

And for the love of God could somebody please implement some useful error 

Things should either work, or not work with a suitable error message.

I don't know how difficult it would be, but a lint style checker that would 
pick up forbidden constructs in CPS functions would be nice too... but 
there I'm getting into dreamland I fear.

You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to