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

Allow importing local classes when the build is running as an administrator

XMLWordPrintable

      I have Authorize Plugin installed and I'm running the build as an admin user (without that it would just fail with ERROR: script not yet approved for use).

      I'm trying to run a job-dsl step with files checked out from SCM.

      It fails when trying to import another class defined in the same directory:

      /var/lib/jenkins/jobs/CFS Pipeline Seed/workspace/avalonPipeline.groovy: 3: unable to resolve class JobBuilder
       @ line 3, column 1.
         import JobBuilder
         ^

      There is a JobBuilder.groovy file in the workspace.

      I was able to run the job only by disabling "Enable script security for Job DSL scripts" option in the global security settings.

            jamietanna Jamie Tanna
            jbochenski Jakub Bochenski
            Votes:
            6 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: