2012-08-09 88 views
0

這是我第一次嘗試在Team City中設置生成配置。團隊城市7.0 - 如何配置依賴於共享編譯庫的構建?

在Subversion中,所有第三方二進制文件都存儲在一個名爲Applications的獨立存儲庫中,因爲它是共享的。

所以我的本地機器上的路徑是

D:\Dev\SolutionRoot\WebProjectRoot 

其在

D:\Dev\Applications 

團隊市,我有兩個構建配置(一個建設項目的.sln到二進制文件引用()和一個只是檢查第三方二進制文件)。

對於Web項目構建的配置我增加了一個神器依賴依賴於「獲取第三方二進制文件」,從「上次成功打造」獲取的文物和神器規則:

/*/.=>Applications 

構建失敗嘗試解決工件依賴性。

Build 'Furniture :: Build' #528 
Started 'Thu Aug 09 15:13:50 BST 2012' on 'machine name' by 'Ryan' 
Finished 'Thu Aug 09 15:14:09 BST 2012' with status 'FAILURE Artifacts resolving failed' 
TeamCity URL http://localhost:8111/viewLog.html?buildId=14&buildTypeId=bt2 
TeamCity server version is 7.1 (build 23907) 

[15:13:50]: bt2 (18s) 
[15:13:50]: Checking for changes (running for 4m:57s) 
[15:13:50]: Publishing internal artifacts 
[15:13:50]: [Publishing internal artifacts] Sending build.start.properties.gz file 
[15:13:50]: Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp 
[15:13:50]: Clean build enabled: removing old files from C:\TeamCity\buildAgent\work\a3a48aff6a8b3347 
[15:13:50]: Checkout directory: C:\TeamCity\buildAgent\work\a3a48aff6a8b3347 
[15:13:50]: Updating sources: agent side checkout (18s) 
[15:13:50]: [Updating sources] Will perform clean checkout. Reason: Checkout directory is empty or doesn't exist (running for 4m:56s) 
[15:13:50]: [Updating sources] Cleaning C:\TeamCity\buildAgent\work\a3a48aff6a8b3347 
[15:13:50]: [Updating sources] VCS Root: Furniture (18s) 
[15:13:50]:  [VCS Root: Furniture] revision: 528_2012/08/09 12:00:34 +0100 
[15:14:09]: Resolving artifact dependencies 
[15:14:09]: [Resolving artifact dependencies] Failed to resolve artifact dependency <Furniture :: Get Third Party Binaries, build #2 [id 10]>: No files matched for patterns "/*/.=>Applications" from <Furniture :: Get Third Party Binaries, build #2 [id 10]> (jetbrains.buildServer.artifacts.ResolvingFailedException) 
[15:14:09]: [Resolving artifact dependencies] Failed to resolve 1 of 1 artifact dependencies 
[15:14:09]: Failed to resolve 1 of 1 artifact dependencies 
[15:14:09]: Publishing internal artifacts 
[15:14:09]: [Publishing internal artifacts] Sending build.finish.properties.gz file 
[15:14:09]: Build failed to start. Artifacts will not be published for this build 
[15:14:09]: Build finished 

我做得對嗎?

回答

0

我在您的設置中看到幾個問題。

首先要引入工件依賴性,你應該在源代碼配置中(你的情況 - 配置,檢出第三方庫)publish those artifacts

然後,你實際上不應該使用工件依賴來檢出短信。 TeamCity支持attaching of several VCS roots到配置。

所以在你的情況下,你可以有兩個根連接的單一配置:根源與你的來源,根與libs。你也可以使用checkout rules來形成你需要的任何checkout directory結構。