When I am trying to load a library in the evaluated script, I get "Could not find any definition of libraries [foo]" error. The minimal job is like this:

      evaluate '@Library("foo") _'
      

      It would be really nice if this code worked as-is, but any workaround would help me too.

          [JENKINS-40560] Allow loading libraries in evaluated scripts

          Roman Timushev created issue -
          Roman Timushev made changes -
          Description Original: When I am trying to load a library in the evaluated script, I get "Could not find any definition of libraries [foo]" error. The minimal job is like this:

          {code:groovy}
          evaluate '@Library("foo") _'
          {code}

          It would be really nice if this code worked as-is, but any workaround would help me too.
          New: When I am trying to load a library in the evaluated script, I get "Could not find any definition of libraries [foo]" error. The minimal job is like this:

          {code}
          evaluate '@Library("foo") _'
          {code}

          It would be really nice if this code worked as-is, but any workaround would help me too.
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-39450 [ JENKINS-39450 ]
          Jesse Glick made changes -
          Resolution New: Won't Do [ 10001 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Sam Liddicott made changes -
          Assignee New: Sam Liddicott [ samliddicott ]
          Sam Liddicott made changes -
          Assignee Original: Sam Liddicott [ samliddicott ]

            Unassigned Unassigned
            rtimush Roman Timushev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: