Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40961

Groovy code in classpath no longer respected

XMLWordPrintable

      It appears since the last two releases, my utility class no longer resolves if I they are in my classpath, which I stipulate vis class path on the jobDsl step.

      The utility class is just a groovy file with one class:
      https://github.com/hypergig/robo-jenkins/blob/master/robo-jenkins/usr/share/jenkins/userContent/meta_jobs/libs/robo/RoboUtil.groovy

      I use to be able to import it in my seed jobs, but it no longer works:

      ERROR: startup failed:
      /var/jenkins_home/workspace/seed/meta_jobs/seed/seed.groovy: 3: unable to resolve class robo.RoboUtil
       @ line 3, column 1.
         import robo.RoboUtil
         ^
      

      I am pretty sure this is due to this change:

      Use Groovy Shell instead of Groovy Script Engine to run DSL scripts, see Migration (#976)

      https://github.com/jenkinsci/job-dsl-plugin/wiki#release-notes

      But I am not sure... I don't fully understand what it means to use the shell over the engine.

            daspilker Daniel Spilker
            hypergig jordan cohen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: