xbw1220 / jenkinsci-unstashParam-library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jenkins unstashParam Library

This pipeline library contains a workaround for Jenkins issue JENKINS-27413. It provides a new step unstashParam that saves file parameter to a workspace.

Configuration

See Jenkins User Handbook, chapter Extending with Shared Libraries on how to configure pipeline libraries.

Usage

In a pipeline script:

library "jenkinsci-unstashParam-library"
node {
   def file_in_workspace = unstashParam "file"
   sh "cat ${file_in_workspace}"
}

The above assumes the Jenkins job has a file build parameter named file.

License

This library is MIT licensed. See license.txt for details.

About

License:MIT License


Languages

Language:Groovy 100.0%