TFS2012 LabDefault.11 template deploy scripts fail with “Team Foundation Server could not complete the deployment task”

后端 未结 5 714
醉酒成梦
醉酒成梦 2021-01-21 11:10

I am having security issues with lab management and standard environments.

I have TFS2012 update 2 installed in my domain \"DevDomain\". I have a separa

5条回答
  •  既然无缘
    2021-01-21 12:10

    OK I have eventually solved this with a little help from our network support chaps.

    I require the agents on my "TestDomain" to be configured as interactive (as my next step is to run coded UI tests) when you do this, specifying a test lab account for communications, but a machine or domain account (in the "TestDomain") as the agent account (either being members of the local machine Administrators group) then the MTM lab process in "DevDomain" can deploy and configure successfully to the test machine in "TestDomain".

    However this leaves the "Visual Studio Lab Agent Service" on the target machine in "testDomain" running as local system which is the process that actually executes your deployment script.

    I could not find a permutation in the test machines "Test agent configuration" tool that let me change this whilst still running the agent as interactive, but you can just change the logon information for the service with the services control panel applet.

    What I did was:

    • Create a "test agent" local account on the "TestDomain" target machine and added that to the "TestDomain" target machine's local administrators group.

    • I then mirrored this by creating a machine local account with the same name and password on the machine hosting our TFS drop share.

    • I then granted read access to the share and file-system to that local account.

    Now when the "devDomain" TFS server initiates a a build the script execution is run by the local "Visual Studio Lab Agent Service" its in the context of the new local "test agent" account and since there is a matching local account on the machine hosting the share it gets permissions granted, the share is readable, and hey presto it can run my script.

提交回复
热议问题