pipeline global library no longer works on latest builds on Windows

74 views
Skip to first unread message

tomwils...@gmail.com

unread,
May 31, 2016, 11:36:25 PM5/31/16
to Jenkins Users
Hi,
   Jenkins pipeline global library no longer works for me on Windows which unfortunately my employer choose to use.  I simply can't access the workflowLibs.git through the http URL (http://127.0.0.1:8080/workflowLibs.git/ in my case).  It give me the Not Found error message even after I already disable the security feature in order to create the empty git repository first.
   I had successfully setup pipeline global library before using Jenkins 1.x but then I was busy with something else until now when suddenly nothing works.  I forgot which version of Jenkins 1.x I used before so I tried the LTS version and Jenkins 2.6 and 2.7.
   Please let me know which option I should follow.  I already tried to manually create the git repository under workflow-libs but it doesn't work.  SSH mechanism doesn't work on Windows for the initial repository either.

Thanks

Baptiste Mathus

unread,
Jun 1, 2016, 2:53:38 AM6/1/16
to jenkins...@googlegroups.com

Hi,
Are you sure it's not just the Git URL? Does really your Jenkins instance run on *your* machine? (127.0.0.1)
Cheers

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/084c46b1-f3d5-4caa-a335-a46ad290de5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

tomwils...@gmail.com

unread,
Jun 1, 2016, 12:02:50 PM6/1/16
to Jenkins Users, m...@batmat.net
Hi Baptiste,
   I'm sure it run on my machine because I'm able to do any other tasks with Jenkins.  I just prefer to use the loop back address for now so that I do not accidentally let anyone log into my machine and run arbitrary code.

Thanks

tomwils...@gmail.com

unread,
Jun 1, 2016, 6:22:36 PM6/1/16
to Jenkins Users, m...@batmat.net
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.

Thanks

On Wednesday, June 1, 2016 at 1:53:38 AM UTC-5, Baptiste Mathus wrote:

Craig Rodrigues

unread,
Jun 1, 2016, 7:17:12 PM6/1/16
to Jenkins Users
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

tomwils...@gmail.com

unread,
Jun 2, 2016, 10:41:35 AM6/2/16
to Jenkins Users, rod...@freebsd.org
Thanks Craig, that's seem to be the way I'm going to resolve this problem
Reply all
Reply to author
Forward
0 new messages