This pipeline library contains a workaround for Jenkins issue JENKINS-27413. It provides a new step unstashParam
that saves file parameter to a workspace.
See Jenkins User Handbook, chapter Extending with Shared Libraries on how to configure pipeline libraries.
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
.
This library is MIT licensed. See license.txt
for details.