wcm.io Jenkins Pipeline Library for CI/CD
Unmaintained
This project is currently not maintained.
Since Jenkins Pipeline has reached a certain state of production scripted
pipelines are the way to go.
But: Not everything known from the UI is available in Pipeline and
configuring and writing scripts is not so easy for the normal developer.
The target of this library is to take out some complexity (and yes
adding some too) of the pipeline creation and to bring back some known
functionality (for example GIT_BRANCH
and SCM_URL
environment
variables, mail notification on still unstable etc.)
Want to see an example? Have look at
Usage examples
The pipeline library was developed with a focus to ease Java and Maven
build processes within companies which have a more or less similiar
project structure e.g.
The assumption is that in these environments
So why configure maven repositories and scm credentials in
every pipeline?
So the key concepts of the pipeline enable you to
to builds.
Running this pipeline library will result in more structured and easier
to maintain pipeline scripts.
Configured properly this library enables you to checkout scm
with these lines of code:
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*
checkoutScm( (SCM) : [
(SCM_URL) : "git@domain.tld/group/project.git",
]
)
Or running maven with local and global maven settings with these lines
of code:
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*
execMaven(
(SCM) : [
(SCM_URL) : "git@domain.tld/group/project.git",
],
(MAVEN): [
(MAVEN_GOALS) : [ "clean", "install" ]
]
)
Looking for an example on how a pipeline script looks like
when using Pipeline? Have a look at
Usage examples
Have a look at the setup tutorial to
start using Pipeline Library.
Have a look at requirements to get the library running.
The pipeline library comes with the following steps:
checkoutScm
conditionalStage
execMaven
execMavenRelease
execNpm
getScmUrl
setBuildName
setScmUrl
setupTools
sshAgentWrapper
transferScp
Please refer to SetupTutorial for detailed
instruction on how to setup the library in your environment.
The library uses two approaches for testing.
The class parts are tested by unit testing using JUnit/Surefire. All
unit tests have the naming format *Test.groovy
and are located belowtest/io
.
The step parts are tested by using
Jenkins Pipeline Unit
with jUnit/Failsafe. All integration tests have the naming format*IT.groovy
and are located below test/vars
.
mvn clean install
mvn license:update-file-header
Please have a look at the Releases