我添加了一个windows slave来执行npm build,在我的package.json中我有一个步骤来执行“unzip pack.zip”。Jenkins npm build未能在Windows slave上解压缩包
当我做NPM直接建立在它的一切成功,但是当它被使用詹金斯完成任务,它无法解压缩文件的邮箱即pack.zip
文件甚至被提取正确使用工具,如解压,Winrar和7z等。
我写了bat文件来做npm build。当我使用cmd运行它时,它没有任何问题,但是当我从jenkins执行相同的bat文件时,它在同一提取步骤中失败。下面
新增日志:
inflating: saui-client/node_modules/sig-quote/node_modules/sig-core/node_modules/underscore/underscore-min.map
error: expected central file header signature not found (file #73741).
(please check that you have transferred or created the zipfile in the
appropriate BINARY mode and that you have compiled UnZip properly)
inflating: saui-client/node_modules/sig-quote/node_modules/sig-core/node_modules/underscore/underscore.js
D:\jenkins\workspace\BUILD>exit 3
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
感谢您的日志 - 您试图解压缩的zip大小是多少以及格式是什么? – Dvir669
聆听 - 可能是您的解压缩不支持Zip64格式,如果确实如此,请确保Jenkins从服务器使用的是正确版本的UnZip,我们在讨论哪种操作系统? – Dvir669
嘿,文件大小是〜700MB,它是一个.zip文件。从操作系统是Windows Server 2012. 我曾经提到过使用该解压缩工具的绝对路径,我可以直接提取zip文件并使用bat文件,但只有在jenkins询问时才会失败。甚至当我从詹金斯执行相同的bat文件时失败。 – ASR