zowe / jenkins-library

Jenkins Pipeline Library
https://zowe.github.io/jenkins-library
Eclipse Public License 2.0
52 stars 39 forks source link

Jenkins Pipeline Shared Library

This repository holds shared library for Jenkins Pipeline

Import Library

The Jenkins library requires sophisticated operation on Jenkins objects, which requires to be setup as Global Pipeline Libraries to avoid extra In-process Script Approval.

Configure Jenkins Pipeline Job

Import Library in Jenkinsfile

If you didn't check Load implicitly when configuring the job, you need to use @Library to import it.

In your Jenkinsfile, you can add def lib = library("jenkins-library").org.zowe.jenkins_shared_library on top of the file to import library.

Then you can use any classes/methods defined in the library. For example:

github = lib.scm.GitHub.new(this)
github.init([...])
github.commit('my test')

Run Tests

To start test, run gradle command gradle test.

Generate Documentation

Run gradle command gradle groovydoc to generate documentation.

Relase Process Design

All below scenarios are based on master version v2.3.4 as example, timestamp string example is 20190101000000.

Things We Want to Do

Special Notes

Release Options

Pipeline Build Scenarios

Release Scenarios