Dynamically load multiple libraries in one step

66 views
Skip to first unread message

Shiran

unread,
Nov 23, 2017, 4:55:47 AM11/23/17
to Jenkins Users
Hi,
As explained here, a library can be dynamically retrieved in the following way:

library identifier: 'custom-lib@master', retriever: modernSCM(
 
[$class: 'GitSCMSource',
   
remote: 'g...@git.mycorp.com:my-jenkins-utils.git',
   
credentialsId: 'my-private-key'])

Is there a way to load multiple libraries in the same command?

For example, instead of: 
library identifier: 'first-lib@master', retriever: modernSCM(
 
[$class: 'GitSCMSource',
   
remote: 'g...@git.mycorp.com:my-jenkins-utils.git',
   
credentialsId: 'my-private-key'])

library identifier: 'second-lib@master', retriever: modernSCM(
 
[$class: 'GitSCMSource',
   
remote: 'g...@git.mycorp.com:my-jenkins-utils.git',
   
credentialsId: 'my-private-key'])

I want to do something like this (not working):
library identifier: ['first-lib@master', 'second-lib@master'], retriever: modernSCM(
  [$class: 'GitSCMSource',
   
remote: 'g...@git.mycorp.com:my-jenkins-utils.git',
   
credentialsId: 'my-private-key'])


Thanks! :)

Oleg Nenashev

unread,
Nov 26, 2017, 11:50:57 AM11/26/17
to Jenkins Users
AFAIK no, but you can create a feature request in Jenkins JIRA.


четверг, 23 ноября 2017 г., 12:55:47 UTC+3 пользователь Shiran написал:
Reply all
Reply to author
Forward
0 new messages