Groovy in Jenkins has some quirks and they're really driving me nuts.
Some of the very neat features of Groovy, such as closures and .each() and
.findAll() don't work as advertised. Which is a problem because it's these
neat ways of doing things that are always used when you google a problem!
It seems I can get around it sometimes by using a helper function declared
as @NonCPS... but I don't have any idea what that means, despite looking at
the documentation (ok, I haven't read it exhaustively, but the references
to NonCPS I've looked at so far haven't clarified things.
And it doesn't even seem consistent in when things work and when they fail.
I guess there must be some pattern to it, but sometimes it seems like I do
something in one place, and it works fine, do the same thing somewhere
else, and it doesn't work. Often failing quietly so I'm scratching my head
trying to work out what I've done wrong, until I start sticking liberal
echo statements into things and find that I haven't done anything wrong
other than use standard Groovy where Jenkins doesn't support standard
My development time woud be much reduced if I could just test groovy code
locally in Eclipse.. but since stuff that works correctly there often
doesn't work in Jenkins, I'm stuck doing endless test builds. Each one may
not take long (at because I comment out what I'm not testing) but when it's
minutes rather than seconds, multiply that by a couple of hundred times
trying to work out why it's not performing as expected.. you get the idea.
Is there at least a page somewhere that says what works and what doesn't?
And if not, why not?
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.