9

I am having an issue with the new TFS 2015 Update 2 Gated Builds.

After attempting a check-in the gated build queues just fine, every part of the build is successful until it reaches the last step of "Check in gated changes".

Gated Build Timeline

When I look at the log for that step I get:

enter image description here

[Error]The shelveset _Build_5427;Build\ad8fe058-f936-4908-91de-57e7bc6a2f9d could not be found for check-in

When I look at the 'Get Sources' log, I see:

2016-04-01T19:11:12.3062092Z tf get /version:C6213

2016-04-01T19:11:13.2125013Z tf shelve _Build_5427 /replace

2016-04-01T19:11:13.3218610Z Successfully created new shelveset _Build_5427;Domain\BuildServiceUser

I recognize the username as the service user (and have thus redacted it here). It looks like it is trying to find the correct shelveset name, but for the wrong user.

Update 4/20/2016 :
I ended up having to create a brand new project.

abest
  • 494
  • 4
  • 15
  • Related: 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&prof=required – jessehouwing Apr 07 '16 at 18:40
  • Can you check the Windows Credential Vault to see if there are any existing account credentials for TFS stored there? Especially for the BuildServiceUser (if you can log on with that account)? – jessehouwing Apr 07 '16 at 18:41
  • 1
    For a possible workaround, can you try adding my TFVC task "Update gated changes" to the build as the last step? It updates the shelveset and may possibly create it with the correct account for you to at least have the build succeed. https://github.com/jessehouwing/vsts-tfvc-tasks/wiki/Shelve https://marketplace.visualstudio.com/items?itemName=jessehouwing.jessehouwing-vsts-tfvc-tasks – jessehouwing Apr 07 '16 at 18:44
  • Any chance that you build service account does not have permission to check-in or that it has gotten into the stakeholder access level. – Tore Østergaard Sep 28 '16 at 13:52

2 Answers2

0

The failed reason: your are trying to check in files with your own account. But the build agent try to check in the changes with the service account.

It seems there are something wrong with your build agent. After you update your TFS server to TFS update2, you also need to update your build agent. If still not work , try to download the agent and deploy a new one. Detail steps from MSDN: Deploy a Windows build agent

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • I made sure to update the build agents after the update. But just as a precaution, I deleted all of the agents on all build servers. completely erased all of their workspaces not only on filesystem, but also using the WorkSpace sidekick, and then re-installed and configured them from scratch following the instructions on the MSDN page. ... same result. Per corporate policy, these agents must run as this specific domain user. – abest Apr 04 '16 at 12:55
  • Did this only occurs with your account ? How about other Colleagues' gated check-in results? I was wondering if there is something wrong with your account. – PatrickLu-MSFT Apr 06 '16 at 10:03
  • 1
    This would probably be more of a comment, not an answer. – jessehouwing Apr 07 '16 at 18:39
  • I am running into the same issue. the build agent is configured properly and has been configured properly multiple times – anthonyterra Apr 25 '16 at 17:19
  • This just started happening with our TFS 2015 U3 on prem server. Nothing has been changed for a while – StingyJack Sep 08 '17 at 03:32
0

I experienced this issue using on-premise TFS 2015 Update 2. As a workaround I settled with a regular CI-build instead of the Gated trigger and I scheduled a release buiild nightly.

However, we have recently installed TFS 2015 Update 3 and that solved the issue. We now use the configuration that we wanted: 1 Gated build that checks in the changes and 1 Continuous Integration build for the release.