2015-07-21 24 views
1

我在我的Mercurial項目中添加了SVN項目作爲subrepository(遵循this說明),現在TeamCity無法構建Mercurial項目。我得到以下錯誤:添加SVN子文件到Mercurial後發生TeamCity錯誤

[Updating sources] Failed to build patch for build #???, VCS root: "mercurial: https://myrepo" {instance id=41, parent internal id=22, parent id=mercurial_repo_id, description: "mercurial: https://myrepo"}, due to error: Cannot build patch: ClientAbortException: java.io.IOException 

[Updating sources] Problem while loading patch data stream: Failed to obtain stream from server. Server status: 504 (Gateway Time-out) 

Problem while loading patch data stream: Failed to obtain stream from server. Server status: 504 (Gateway Time-out) 

java.io.IOException: Failed to obtain stream from server. Server status: 504 (Gateway Time-out) 

當我在本地克隆回購,一切都很好,但TeamCity的並不見subrepo並且在變化曲線沒有subrepo。我試圖添加不同的構建步驟,但它沒有幫助。我也試過在TeamCity的改變VCS結賬模式代理結賬,但有另一個錯誤是由於自簽名sertificates:

Failed to perform checkout on agent: 'hg --config ui.interactive=False clone -U --uncompressed https://...' command failed. 
stderr: abort: could not find web.cacerts: /etc/ssl/ca-bundle.pem 

然而,結賬方式不應該是因爲這樣的問題,錯誤的原因已在TeamCity的8個版本中解決(我們使用8.0.6)。

我應該如何配置TeamCity與Mercurial repo內的SVN subrepo一起使用?

謝謝。

UPD:

我終於找到了答案:我雖然需要同時執行對代理結算(添加證書或迫使其信任所有),以修正錯誤,問題解決了!

回答

1

我還沒有完成SVN的subrepos,但我已經完成了這與hg subrepos但技巧是teamcity服務器的hgrc文件需要配置爲靜默採取SVN回購,所以你可能需要提供身份驗證信息,也許也信任hgrc文件中的證書。

+1

SVN回購也被添加到TeamCity,所以TeamCity具有驗證信息。這不夠嗎?如果不是,該文件在哪裏?不幸的是,我對TeamCity的管理不太好。 – Lia

+0

這裏的竅門是TC沒有檢出SVN回購,HG客戶端是,它不能訪問TC。 –

+0

另一種方法是跳過子報表並直接將SVN回購添加到teamcity項目。這可能會失去hg subs具有的「修復特定版本」功能。 –