Created
April 8, 2020 00:49
-
-
Save marcosborges/4ad3896b42608eff13489e4695d3c961 to your computer and use it in GitHub Desktop.
Thank you so much Marcos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi again @mydearmuthu1978
This script is also to be run in the Jenkins script console.
From line 1 to 6 are imports of the classes that the script will use.
In line 8 there is the variable that contains the name you want to use to register your shared library.
In line 9 is the address of the GIT repository where your shared library is.
In line 11 there is a condition that the installation code will only be executed if the shared library is not installed.
In line 12 I get all shared libraries already registered with Jenkins.
In lines 13 and 14 I initialize a class that is responsible for git information.
In lines 15 to 19 I initialize the class responsible for configuring the shared library.
In line 20 added this new library to the list of existing libraries.
From line 21 to 13 I save this new shared library.