2017-05-19 76 views
2

我們使用Jenkins Blue Ocean在Windows 2012 r2 Jenkins Slaves上構建.Net應用程序。我們在git倉庫中使用Jenkinsfile來定義構建管道。Jenkins Blue Ocean工作區路徑太長

由於工作空間構建路徑對於Windows來說太長而無法處理,有一些項目會導致構建失敗。
這通常發生在最大出最大路徑的nuget packnpm install命令中。

The specified path, file name, or both are too long. 
The fully qualified file name must be less than 260 characters, 
and the directory name must be less than 248 characters. 

script returned exit code 1 

我們可以在不影響我們如何落下的工作區文件夾的東西Windows可以處理Visual Studio解決方案的NuGet包路徑的長度是多少?

回答

0

對於聲明管道使用customworksace選項中的節點,碼頭工人或dockerfile部分覆蓋默認路徑的工作空間路徑和點。看例子。

agent { 
node { 
    customWorkspace '/some/other/path' 
} 

它可以是相對於工作空間根或絕對路徑的相對路徑。

0

您可以隨時定製目錄