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

Shared Libraries: Branch specifier ignored when passing within list of shared libraries

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • pipeline
    • None

      I've searched for an existing bug describing this behavior to no avail, but please forgive me if this issue is a duplicate.

       

      Expected Behavior

      Per the official "Extending with Shared Libraries" doc, we can load multiple libraries like so, using a branch specifier to fetch a specific version:

      @Library(['my-shared-library', 'otherlib@abc1234']) _
      

       

      Experienced Behavior

      However, I've found that not to be the case and I've concluded that when using a list of shared libraries, the branch specifier is ignored:

       

        Single Library Library List
      Code
      @Library('otherlib@abc1234') _
      
      @Library(['my-shared-library', 'otherlib@abc1234']) _
      Loading Message
      Loading library otherlib@abc1234
      Loading library otherlib@abc1234
      Result The println in the dev branch is shown as expected The println in the master branch is shown
      Conclusion Works as intended! Something's wrong. We should be able to version-pin any library from within a list

            Unassigned Unassigned
            devoops Mark Mutti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: