Complete the code to load a shared library explicitly in Jenkins Pipeline.
def lib = library('[1]').myLib
Explicit loading uses the library() step with the library name as a string.
Complete the code to use implicit loading of a shared library in Jenkins Pipeline.
@Library('[1]') _
Implicit loading uses the @Library annotation with the library name.
Fix the error in the explicit loading code to correctly call a function from the shared library.
def lib = library('[1]') lib.[2]()
The library name must be a string matching the shared library name. Then call lib.callFunction() from the library object.
Fill both blanks to explicitly load a shared library and call its function named 'buildApp'.
def lib = library('[1]') lib.[2]()
Explicit loading requires the library name string and then calling the function by its exact name.
Fill all three blanks to implicitly load a shared library named 'utils' and call its 'testConnection' function.
@Library('[1]') _ def result = [2].[3]()
Implicit loading uses the @Library annotation with the library name, then calls the function on the library object.