2016-06-17 42 views
5

我正在設置一個AutoCI - > Jenkins - > Octopus自動構建過程。我使用了一個名爲octopackjs &一飲而盡,OCTO包收拾我的node.js項目成一個.tar文件,像這樣:爲什麼我的.tar文件會生成數百個PaxHeader文件?

return gulp.src(['**/*', '!gulpfile.js']) 
     .pipe(octo.pack("tar.gz")) 
     .pipe(octo.push({apiKey: 'API-SUPERCOOLKEY', host: 'https://octopus.supercooldomain.net', replace: true})); 

我能收拾起來,並且在被推到正確的地方八達通服務器。但是,當我檢查該.tar文件的內容時,它被數百個名爲「PaxHeader」的文件污染。從一些環顧四周,該文件旨在包含.tar包的元數據。當八達通試圖將該文件提取到我的目標環境時,它會拋出以下錯誤跟蹤:

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 

發生了什麼事?爲什麼我的.tar文件有這些工件?

編輯:這些PaxHeader文件,當作爲文本打開的內容,範圍從項目模塊的package.json內容,隨機許可信息,對目錄,字符串列表等..

回答

0

遇到了同樣的問題,並且我在將npm升級到最新版本(目前爲3.10.7)時遇到了同樣的問題,正如http://help.octopusdeploy.com/discussions/problems/46332-deploy-to-linux-centos7-deploy-failing的最後一篇文章中所建議的那樣。

不知道你是否是Windows,但是我使用了npm-windows-upgrade,正如這個SO帖子中建議的那樣:How do I update node and npm on windows?

然後刷新所有node_modules並在項目上執行新鮮的npm安裝。結果存檔不僅包含重複的PaxHeader文件,而且還更快地生成。

相關問題