Have you discovered anything? See my recent post today about similar issue. You can follow it.
On Monday, August 3, 2020 at 2:56:28 PM UTC-4 Chris Shannon wrote: > I've been using Jenkins shared libraries for quite a while, but something > just popped up which is confusing me quite a bit. Instead of just creating > steps, I'm now trying to create a full declarative pipeline inside the > shared library. > > > In any case, what I'm finding is that this works great when my pipeline is > defined directly inside the call method. As soon as I do a simple > function call, I get errors like: > > > hudson.remoting.ProxyException: groovy.lang.MissingPropertyException: No such > property: any for class > > To be clear, here is working code: > > def call() { > pipeline { > agent any > > stages { > stage("Stage") { > steps { > echo "hi" > } > } > } > } > } > > > And here is non-working code: > > def call() { > execute() > } > > def execute() { > pipeline { > agent any > > stages { > stage("Stage") { > steps { > echo "hi" > } > } > } > } > } > > > For reasons beyond this post, we are trying to add some commonality and > argument checking to our steps, which is why I'd like to be able to use > that concept of the extra function call.. > > > Any help/pointers would be much appreciated. > > > Thanks! > > Chris > -- 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 https://groups.google.com/d/msgid/jenkinsci-users/200486b2-eafe-46e8-9bf3-83050799eecen%40googlegroups.com.