jk-piepline-utils Jenkins Shared Library which contains a wide range of functionalities accessible as reusable Jenkins pipeline steps, which pipeline code reduce redundacy accross project and make sure Jenkisnfiles are as DRY as possible. You can use the functions provided by this library to create complex pipelines while preserving readability and simplicity of your Jekinsfile.
In order to load shared libraries, the pipeline described in the Jenkinsfile is required to use the @Library annotation, followed by the name of the library and the version/branch to be loaded (optional)
#!/usr/bin/env groovy
@Library(value="jk-pipeline-utils@master", changelog=false) _
@Library(value="jk-pipeline-utils", changelog=false) _
@Library(value="[email protected]", changelog=false) _
All available function in this library are documented here
Every function is referenced this way:
- Signature: function signature of the setp
- Parameters: the parameters if any that are required
- Return Value: the value returned by the setp if any
- Example: an example of the setp usage in a pipeline
Unit and functional testing will be available soon.
A list of resources to deep dive into this topic