Thanks Craig, that's seem to be the way I'm going to resolve this problem On Wednesday, June 1, 2016 at 6:17:12 PM UTC-5, Craig Rodrigues wrote: > > Hi, > > My advice will differ from some of the advice on this list, but I would > advise you to find a way to accomplish your goal > without using the pipeline global library mechanism. > It is really weird, and as you have found, hard to debug when it doesn't > work. > > My advice is for you to try to find a way to treat your Jenkinsfile as a > Groovy script, > and somehow include your script library in your Jenkinsfile via Groovy > language mechanisms. > > When Jenkins runs your Jenkinsfile, it dynamically creates a class called > Workflowscript, > and places your entire Jenkinsfile inside a Workflowscript.run() method. > I posted some hints > as to what I figured out when I was debugging my scripts: > > https://groups.google.com/forum/#!msg/jenkinsci-users/P7VMQQuMdsY/bHfBDSn9GgAJ > > I don't have a solution for you, because I am not a Groovy expert. But if > you figure something > out, please post your solution to the list. > > -- > Craig > > On Wed, Jun 1, 2016 at 3:22 PM, <[email protected] <javascript:>> > wrote: > > Currently, I only call one variable/function under the vars directory. If >> the pipeline global library mechanism is so unstable, is there anyway I can >> call the function but under a different location without changing the >> Jenkinsfile? After I add the Jenkinsfile to the trunk of my project, it >> has been branched to so many other branches owned by many different >> developers. If I start changing Jenkinsfile in their branches, their first >> reaction would be to raise the question why I mess with their territory. >> >
-- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f79dd330-b0b3-45c8-b742-e762c8d2a851%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
