Pie*_*ato 5 deployment tar node.js octopus
我正在建立一个AutoCI - > Jenkins - > Octopus自动构建过程.我使用一个名为octopackjs和gulp-octo的包将我的node.js项目打包成.tar文件,如下所示:
return gulp.src(['**/*', '!gulpfile.js'])
.pipe(octo.pack("tar.gz"))
.pipe(octo.push({apiKey: 'API-SUPERCOOLKEY', host: 'https://octopus.supercooldomain.net', replace: true}));
Run Code Online (Sandbox Code Playgroud)
我可以收拾它,并将它推到Octopus服务器的正确位置.但是,当我检查该.tar文件的内容时,它会被数百个名为"PaxHeader"的文件污染.从一些环顾来看,该文件旨在包含.tar包的元数据.当Octopus尝试将该文件解压缩到我的目标环境时,它会抛出以下错误跟踪:
System.IO.IOException: Cannot create /home/opsteam/.octopus/Applications/OctopusServer/Dev.Corporate/webapp/2.0.10/PaxHeader because a file with the same name already exists.
09:46:34Error
at System.IO.Directory.CreateDirectory (System.String path) <0x7fdc9e79db50 + 0x00167> in <filename unknown>:0
09:46:34Error
at SharpCompress.Reader.IReaderExtensions.WriteEntryToDirectory (IReader reader, System.String destinationDirectory, ExtractOptions options) <0x4033e800 + 0x00260> in <filename unknown>:0
09:46:34Error
at Calamari.Integration.Packages.TarPackageExtractor.Extract (System.String packageFile, System.String directory, Boolean suppressNestedScriptWarning) <0x4033b4f0 + 0x000f3> in <filename unknown>:0
09:46:34Error
at Calamari.Integration.Packages.GenericPackageExtractor.Extract (System.String packageFile, System.String directory, Boolean suppressNestedScriptWarning) <0x4033b4a0 + 0x0003b> in <filename unknown>:0
09:46:34Error
at Calamari.Deployment.Conventions.ExtractPackageConvention.Install (Calamari.Deployment.RunningDeployment deployment) <0x40335ac0 + 0x000bb> in <filename unknown>:0
09:46:34Error
at Calamari.Deployment.ConventionProcessor.RunInstallConventions () <0x4030aaa0 + 0x00065> in <filename unknown>:0
09:46:34Error
at Calamari.Deployment.ConventionProcessor.RunConventions () <0x4030a940 + 0x0001f> in <filename unknown>:0
Run Code Online (Sandbox Code Playgroud)
到底是怎么回事?为什么我的.tar文件有这些工件?
编辑:这些PaxHeader文件的内容,当以文本形式打开时,范围从项目中模块的package.json内容到随机许可信息,到目录,字符串列表等等......
小智 1
遇到了同样的问题,为我解决的是将 npm 升级到最新版本(目前为 3.10.7),正如http://help.octopusdeploy.com/discussions/problems/46332-deploy下的最后一篇文章中所建议的那样-to-linux-centos7-deploy-failing。
不确定你是 Windows 还是 Windows,但我按照此 SO 帖子中的建议使用了 npm-windows-upgrade:How do I update node and npm on windows? 。
然后刷新所有 node_modules 并在项目上进行新的 npm 安装。结果存档现在不仅不包含重复的 PaxHeader 文件,而且生成速度也更快。
| 归档时间: |
|
| 查看次数: |
2068 次 |
| 最近记录: |