[JIRA] (JENKINS-57994) Shared Libraries: Branch specifier ignored when passing a list of shared libraries

3 views
Skip to first unread message

markmutti@gmail.com (JIRA)

unread,
Jun 12, 2019, 5:31:02 PM6/12/19
to jenkinsc...@googlegroups.com
Mark Mutti created an issue
 
Jenkins / Bug JENKINS-57994
Shared Libraries: Branch specifier ignored when passing a list of shared libraries
Issue Type: Bug Bug
Assignee: Unassigned
Components: pipeline
Created: 2019-06-12 21:30
Priority: Major Major
Reporter: Mark Mutti

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:

@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
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

markmutti@gmail.com (JIRA)

unread,
Jun 12, 2019, 5:32:01 PM6/12/19
to jenkinsc...@googlegroups.com
Mark Mutti updated an issue
Change By: Mark Mutti
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|#using-libraries]
] +, we can load multiple libraries like so:
{code:java}

@Library(['my-shared-library', 'otherlib@abc1234']) _
{code}
*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_|{code:java}
@Library('otherlib@abc1234') _
{code}|{code:java}
@Library(['my-shared-library', 'otherlib@abc1234']) _{code}|
|_Loading Message_|{code:java}
Loading library otherlib@abc1234{code}|{code:java}
Loading library otherlib@abc1234{code}|
|_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|

markmutti@gmail.com (JIRA)

unread,
Jun 12, 2019, 5:32:02 PM6/12/19
to jenkinsc...@googlegroups.com
Mark Mutti updated an issue
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| [https://jenkins.io/doc/book/pipeline/shared-libraries/ #using-libraries]] + , we can load multiple libraries like so:

{code:java}
@Library(['my-shared-library', 'otherlib@abc1234']) _
{code}

*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_|{code:java}
@Library('otherlib@abc1234') _
{code}|{code:java}
@Library(['my-shared-library', 'otherlib@abc1234']) _{code}|
|_Loading Message_|{code:java}
Loading library otherlib@abc1234{code}|{code:java}
Loading library otherlib@abc1234{code}|
|_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|

markmutti@gmail.com (JIRA)

unread,
Jun 12, 2019, 5:33:01 PM6/12/19
to jenkinsc...@googlegroups.com
Mark Mutti updated an issue
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|#using-libraries]+, we can load multiple libraries like so , using a branch specifier to fetch a specific version :

{code:java}
@Library(['my-shared-library', 'otherlib@abc1234']) _
{code}
----
 

*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_|{code:java}
@Library('otherlib@abc1234') _
{code}|{code:java}
@Library(['my-shared-library', 'otherlib@abc1234']) _{code}|
|_Loading Message_|{code:java}
Loading library otherlib@abc1234{code}|{code:java}
Loading library otherlib@abc1234{code}|
|_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|
Reply all
Reply to author
Forward
0 new messages