Providing shared libraries
As an administrator, there are two ways to make the shared libraries available to the pipelines in our Jenkins. Let's start with the folder-level shared library, which provides more limited access.
Folder-level shared libraries
A shared library can be made available to the pipelines in a specific folder by configuring it in the folder's configuration page. When a specific project's pipelines have repeated code, the helper functions that modularize the project's repeated code should be stored in a folder-level shared library, not a global shared library. We will see why soon.
Log in to Jenkins as the adder-admin
user, click the adder folder, then click Configure on the left. Under Pipeline Libraries (gotta love the naming inconsistency), click the Add button to reveal a Library section. Configure the library as follows:
- Name:
my-folder-shared-lib
(This is the name that the Jenkinsfiles will use to point to this...