Generic pipeline functions to be used in Jenkins pipelines. All the functions are available in form of groovy files in vars folder.
-
Add this library in Jenkins client tool as a global library (Manage Jenkins > Configure System > Global Pipeline Libraries) and give it a name, for example, my-jenkins-library.
-
Add the following at the top of the Jenkins pipeline.
@Library('my-jenkins-library') _
- Call the Jenkins Library function from the Jenkins pipeline.
stage('mystage') {
steps {
buildJarMaven(mvnArgs: '-DskipTests')
}
}