2016-09-28 88 views
0

我正在使用TFS版本2015 SP3,並且在創建工作門控簽入構建定義時遇到問題。當成功構建後檢入變更集時,TFS門控簽入失敗

構建流程步驟爲空以防止構建失敗。

當構建成功時,構建服務器嘗試檢查指定的更改並失敗。該錯誤信息是:

The shelveset _Build_56625;Build\ead50f13-855a-45bd-9417-778e04e6fdfe could not be found for check-in

從我可以收集它所要做的事實在構建服務器採用累積用戶,而不是用戶名的GUID。 (見下圖)。

Error 生成日誌

2016-09-27T14:22:59.3450903Z Checking if artifacts directory exists: C:\Agent_3\_work\1\a 
2016-09-27T14:22:59.3450903Z Deleting artifacts directory. 
2016-09-27T14:22:59.3607099Z Creating artifacts directory. 
2016-09-27T14:22:59.3607099Z Checking if test results directory exists: C:\Agent_3\_work\1\TestResults 
2016-09-27T14:22:59.3607099Z Deleting test results directory. 
2016-09-27T14:22:59.3763337Z Creating test results directory. 
2016-09-27T14:22:59.4232406Z Starting: Get sources 
2016-09-27T14:22:59.4544938Z Entering TfvcSourceProvider.PrepareRepositoryAsync 
2016-09-27T14:22:59.4544938Z localPath=C:\Agent_3\_work\1\s 
2016-09-27T14:22:59.4544938Z clean=True 
2016-09-27T14:22:59.4544938Z sourceVersion=68725 
2016-09-27T14:22:59.4544938Z mappingJson={"mappings":[{"serverPath":"$/xxx","mappingType":"map","localPath":"\\"}]} 
2016-09-27T14:22:59.4544938Z Syncing repository: xxx(TFVC) 
2016-09-27T14:22:59.4544938Z workspaceName=ws_1_18 
2016-09-27T14:23:00.3451244Z Undo any pending changes under workspace. 
2016-09-27T14:23:01.2669675Z No inconsistencies were found to clean up. 
2016-09-27T14:23:01.7044792Z Workspace Name: ws_1_18;Build\ead50f13-855a-45bd-9417-778e04e6fdfe 
2016-09-27T14:23:01.7669760Z tf unshelve Gated_2016-09-27_04.22.53.2745;MyDomain\MyUser 
2016-09-27T14:23:02.2413159Z edit: C:\Agent_3\_work\1\s\app\xxx\xxx.ts 
2016-09-27T14:23:02.5225711Z Successfully unshelved Gated_2016-09-27_04.22.53.2745;MyDomain\MyUser into workspace ws_1_18;Build\ead50f13-855a-45bd-9417-778e04e6fdfe 
2016-09-27T14:23:02.5225711Z tf get /version:68725 
2016-09-27T14:23:03.0187586Z tf shelve _Build_56625 /replace 
2016-09-27T14:23:03.1906333Z Successfully created new shelveset _Build_56625;Build\ead50f13-855a-45bd-9417-778e04e6fdfe 
2016-09-27T14:23:03.2999952Z Done syncing repository xxx to version 68725 (workspace version C68725) 
2016-09-27T14:23:03.2999952Z Leaving TfvcSourceProvider.PrepareRepositoryAsync 
2016-09-27T14:23:03.4093700Z Running tasks 

是......我讀過:

On Premise Gated Check-in Fails with "The shelveset ... could not be found for check-in" - 但我不願意拋售5年曆史只是爲了得到這工作。

https://social.msdn.microsoft.com/Forums/en-US/8016349e-88dd-4fe1-aa6b-13c8d897985f/tfs-2015-on-premise-gated-checkin-fails-with-the-shelveset-could-not-be-found-for-checkin?forum=tfsbuild - 這個問題給了我一些見解,但沒有工作解決方案。

我們試圖

  • 創建一個新的代理
  • Trowing離開本地工作區
+1

作品以及我的TFS15。由於我們沒有您的環境,因此很難排除此問題。即使你提到創建一個新的團隊項目不是你的解決方案。但是,您仍然可以創建一個用於測試的範圍來縮小此問題,並查看門控簽入構建是否適用於新創建的構建? –

+0

遇到過只發生在從TFS2013升級的項目集合上的問題,但與新創建的TFS 2015項目集合很好地配合。 –

+0

我創建了一個新項目,創建了一個新的構建定義,並添加了門控簽入。然後簽入一個新文件。生成失敗,出現類似錯誤: [錯誤]無法找到shelveset _Build_56722; Build \ ead50f13-855a-45bd-9417-778e04e6fdfe登記 –

回答

0

我們問題的原因是在Tfs_Configuration數據庫的雙重身份構建。

用下面的查詢,您可以檢查雙重身份:

SELECT * FROM tbl_Identity WHERE PartitionId = 1 AND TypeId = 8 
+0

哪個字段是翻倍的字段?(有幾個身份標識符字段) – StingyJack

+0

Hi @StingyJack已經有一段時間了。你有類似的問題嗎? –

+0

是的,但只有顯示名稱這樣的東西是表中的愚蠢 – StingyJack