Fetching binary or zipped uploaded files in Jenkins - Windows cannot open the folder . The Compressed(zipped) Folder is invalid

谁都会走 提交于 2020-02-26 04:00:10

问题


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

enter image description here

It's resulting same issue for both Binary & Zip file. Any pointers on this please?

来源:https://stackoverflow.com/questions/59472201/fetching-binary-or-zipped-uploaded-files-in-jenkins-windows-cannot-open-the-fo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!