Complete the code to load a shared library in Jenkins pipeline.
def lib = [1] 'my-shared-library'
The library step loads a shared library in Jenkins pipelines.
Complete the code to call a function named 'buildApp' from the shared library.
lib.[1]()You call the function by its exact name defined in the shared library, here buildApp.
Fix the error in the code to correctly load the shared library with a specific version.
def lib = library(name: 'my-shared-library', [1]: '1.2.3')
The correct key to specify a version by tag is tag.
Fill both blanks to define a shared library in Jenkinsfile with default version and retriever.
@Library('[1]@[2]') _
The library name is 'my-shared-library' and the default branch is usually 'main'.
Fill all three blanks to create a shared library call with a custom retriever and version.
library(name: '[1]', retriever: [2], [3]: 'release-1.0')
The library name is 'custom-shared-lib', retriever is 'modernSCM(scm)', and version is specified by 'tag'.