Frank Merrow created JENKINS-13740:
--------------------------------------

             Summary: How do we get Groovy to honor some sort of "class path" 
for finding Groovy classes
                 Key: JENKINS-13740
                 URL: https://issues.jenkins-ci.org/browse/JENKINS-13740
             Project: Jenkins
          Issue Type: Improvement
          Components: groovy
    Affects Versions: current
         Environment: Multiple Jenkins under Windows
            Reporter: Frank Merrow
            Assignee: vjuranek


At a recently Cloud Bees class KK could not answer this question and suggested 
creating a Ticket . . .

So the issue is this, we have multiple Jenkins Instances (8 so far and 
growing), but with many common elements . . . in particular, many common pieces 
of Groovy.  For this question, the "type" of Groovy is not relevant; I don't 
care if it is the post build plug in, Scriptler or Jenkins built in script 
console . . . none of them seem to work the way I would expect.

As it stands now, what we have are all these custom Groovy scripts sprinkled 
among all our systems . . . We have to carry these peices of Groovy around by 
hand from Jenkins to Jenkins . . . an update on one system requires an update 
on 7 others . . . annoying and error prone.  What we would like to do is to 
have a Groovy class script repository and instead of carrying the custom groovy 
from system to system, we like to make all the Groovy scripts look like this 
instead:

obj = new DoSomethingClass()
obj.DoIt()

Now if something needs to be changed, instead of fixed 8 to 12 Jenkins 
instances, I fix the DOSomethingClass.groovy in Perforce and sync the update on 
each system . . . 100% accurate and doable via automation.

This works easily in Groovy itself using either Groovy command line or Groovy 
Console.  However, as soon as I tried to get at that class from any 
Jenkins/Groovy . . . I cannot get it to find that class.  I've tried adjusting 
CLASSPASS and/or using the -cp switch on the JVM . . . either seem to help . . 
. Jenkins/Groovy just won't seems to search for things or at least won't search 
for them at a place I tell it to . . .

If you have a way to make this happen . . . I'd love to hear it . . . even if I 
could not add a new location to the places Groovy searches for Classes . . . 
even knowing there was "someplace" Jenkins would search would be a big help . . 
. like $JENKINS_HOME/Groovy or someplace I could put classes so I can update 
all instances without having to go to the GUI on each Jenkins instance to make 
the update.

Frank

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to