This is same/similar question as : Fetching uploaded files in Jenkins
But with solution followed per this : Upload file in Jenkins input step to workspace , it is resulting in ' Can not open file 'file1.zip' as archive'
Since bytes are manipulated as part of upload process, think may be it is resulting in problem.
Tried alternative solution per https://github.com/janvrany/jenkinsci-unstashParam-library - its not helping either as it results in error ''ERROR: unstashParam: No file parameter named 'file'''
Any pointers on this would be of great help.
To re-iterate the question,
Upload goes through. But downloading same file from server resulting in invalid file..
Here is simple script with File parameters,
@Library('my-shared-library@master') _
node {
stage("Upload File") {
copy_bin_to_wksp.inputGetFile('file1.zip')
}
}
If I try opening uploaded file, it results in following error
It's resulting same issue for both Binary & Zip file. Any pointers on this please?