Dynamically load multiple libraries in one step

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamically load multiple libraries in one step

Shiran
Hi,
As explained here, a library can be dynamically retrieved in the following way:

library identifier: 'custom-lib@master', retriever: modernSCM(
 
[$class: 'GitSCMSource',
   
remote: '[hidden email]: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: '[hidden email]:my-jenkins-utils.git',
   
credentialsId: 'my-private-key'])

library identifier: 'second-lib@master', retriever: modernSCM(
 
[$class: 'GitSCMSource',
   
remote: '[hidden email]: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: '[hidden email]:my-jenkins-utils.git',
   
credentialsId: 'my-private-key'])


Thanks! :)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/659061df-e58b-466f-88ab-893bb49f2eff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Dynamically load multiple libraries in one step

Oleg Nenashev
AFAIK no, but you can create a feature request in Jenkins JIRA.


четверг, 23 ноября 2017 г., 12:55:47 UTC+3 пользователь Shiran написал:
Hi,
As explained <a href="https://jenkins.io/doc/book/pipeline/shared-libraries/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fdoc%2Fbook%2Fpipeline%2Fshared-libraries%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzi5Xo827_lODtglxm9wkc-kRKTg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fdoc%2Fbook%2Fpipeline%2Fshared-libraries%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzi5Xo827_lODtglxm9wkc-kRKTg&#39;;return true;">here, a library can be dynamically retrieved in the following way:

library identifier: 'custom-lib@master', retriever: modernSCM(
 
[$class: 'GitSCMSource',
   
remote: '[hidden email]: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: '[hidden email]:my-jenkins-utils.git',
   
credentialsId: 'my-private-key'])

library identifier: 'second-lib@master', retriever: modernSCM(
 
[$class: 'GitSCMSource',
   
remote: '[hidden email]: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: '[hidden email]:my-jenkins-utils.git',
   
credentialsId: 'my-private-key'])


Thanks! :)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d54b6f6c-adf7-4970-9d4e-dcae1ea20793%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.