Skip to content

Shared library of utility functions for Jenkins pipelines

License

Notifications You must be signed in to change notification settings

method-inc/jenkins-utilities

Repository files navigation

Jenkins Utilities

Build Status semantic-release

This repository is a shared library of utilities to be used in Jenkins pipelines.

The global functions contained in this repository should be considered alpha; future breaking changes may be expected.

Usage

Import the library at the latest released version tag and then call utility functions as steps in your declarative or scripted pipeline.

// Jenkinsfile
@Library('jenkins-utilities@v1.0.0') _

pipeline {
    agent { docker 'maven:3-alpine' } 
    stages {
        stage('Example Build') {
            steps {
                cancelPreviousBuilds()
                sh 'mvn -B clean verify'
            }
        }
    }
}