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

Dynamically load multiple libraries in one step

XMLWordPrintable

      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

            Unassigned Unassigned
            sho_nig S H
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: