Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.28 KB

File metadata and controls

46 lines (34 loc) · 1.28 KB

Introduction

This repository contains a small set of reusable parts for Jenkins pipelines building Joyent components in the form of a shared library. As of the initial writing, helpful resources on extending pipelines with shared libraries included:

Brief Usage Example

(The shared library would generally be configured on the Jenkins server first as described in the upstream "Using Libraries" documentation.)

The joyCommonLabels helper if for generating commonly used label expressions. So

pipeline {
    agent {
        label '!platform:true && image_ver:18.4.0 && pkgsrc_arch:x86_64 && pi:20151126T062538Z && jenkins_agent:2'
    }
    // rest of your pipeline here
}

Becomes

@Library('jenkins-joylib@tag_version') _

pipeline {
    agent {
        label joyCommonLabels(image_ver: '18.4.0')
    }
    // rest of your pipeline here
}

Versioning

Pipelines should almost always point at a specific x.y.z tag of this library so that builds remain reproducible.