I’m excited to announce a new Embedded Artistry GitHub repository: jenkins-pipeline-lib
I’ve been overhauling our Jenkins build server setup to use pipeline multi-branch builds. I like the pipeline format: I’m thrilled that build stages are defined in a file that is stored under SCM with the source code. Developers can look at the commands being run and debug them locally, rather than trying to figure out how the build server works.
Since I support a large number of repositories, I created a pipeline library to contain common functionality and reduce bring-up time for new projects. Functionality includes:
- Sending email notifications
- Sending slack notifications
- Retrieving the build log
- Retrieving the
gitchange log - Retrieving the
gitcommit hash - Convenience functions for
gittagging - Setting GitHub commit status
- Filling GitHub issues
Using the Pipeline Library
I recommend forking the library so that updates don’t surprise you by breaking your builds.
In order to use this pipeline library in your own projects, please see the Extending with Shared Libraries Jenkins documentation.
Examples
For example pipeline files which use this library, refer to the following repositories:
