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

Jenkins CLI groovy command cant access classes from workflowLibs.git

      I would like to run snippets of groovy code (that access classes defined in the workflowLibs.git repository) via the Jenkins CLI using the groovy and groovsh command support.

      Currently Jenkins CLI starts executing the groovy code, but cant find the relevant classes (defined in workflowLibs.git repo).

      I think this is just a matter of having the right classpath setup in the groovy/groovysh backend on the Jenkins server that is accessed via the CLI (as is done auto-magically for the script area within the workflow job definition).

          [JENKINS-27699] Jenkins CLI groovy command cant access classes from workflowLibs.git

          Nicholas Corran created issue -

          Jesse Glick added a comment -

          The workflowLibs repository is only intended to be used from Workflows: the classes are expected to run Workflow steps and be CPS-transformed. What you can and should do from the groovy CLI command is quite different.

          Jesse Glick added a comment - The workflowLibs repository is only intended to be used from Workflows: the classes are expected to run Workflow steps and be CPS-transformed. What you can and should do from the groovy CLI command is quite different.
          Jesse Glick made changes -
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 162012 ] New: JNJira + In-Review [ 196910 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Andrew Bayer made changes -
          Labels Original: cli user-experience workflow New: cli pipeline user-experience workflow
          Andrew Bayer made changes -
          Labels Original: cli pipeline user-experience workflow New: cli pipeline user-experience

            jglick Jesse Glick
            ncorran Nicholas Corran
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: