-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
As explained here, a library can be dynamically retrieved in the following way:
{{}}
library identifier: 'custom-lib@master', retriever: modernSCM( [$class: 'GitSCMSource', remote: 'git@git.mycorp.com:my-jenkins-utils.git', credentialsId: 'my-private-key'])
{{}}
Please enable multiple libraries loading, in one command.
For example, instead of:
{{}}
library identifier: 'first-lib@master', retriever: modernSCM( [$class: 'GitSCMSource', remote: 'git@git.mycorp.com:my-jenkins-utils.git', credentialsId: 'my-private-key']) library identifier: 'second-lib@master', retriever: modernSCM( [$class: 'GitSCMSource', remote: 'git@git.mycorp.com:my-jenkins-utils.git', credentialsId: 'my-private-key'])
We could just write:
{{}}
library identifier: ['first-lib@master', 'second-lib@master'], retriever: modernSCM( [$class: 'GitSCMSource', remote: 'git@git.mycorp.com:my-jenkins-utils.git', credentialsId: 'my-private-key'])
{{}}
Thanks
[JENKINS-48233] Dynamically load multiple libraries in one step
Component/s | New: workflow-cps-global-lib-plugin [ 21714 ] | |
Component/s | Original: pipeline [ 21692 ] |