content_image/815150.jpg
<img src='content_image/815150.jpg'>

## Dynamic retrieval 

If you only specify a library name (optionally with version after @ ) in the library  step, Jenkins will look for a preconfigured library of that name. (Or in the case of a github.com/owner/repo  automatic library it will load that.) 

But you may also specify the retrieval method dynamically, in which case there is no need for the library to have been predefined in Jenkins. Here is an example: 

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

It is best to refer to Pipeline Syntax  for the precise syntax for your SCM. 

Note that the library version must  be specified in these cases. 

