我正在尝试使用 Build-Deploy-Test 工作流程使用 TFS 2012 设置标准实验室环境。我设置了测试控制器和测试代理,但是当 LabManagement 工作流开始执行时,我在 RunDeploymentTask 活动中遇到异常
Initial Property Values
BuildLocation = \\S0503TFS2T\TFSPlayground\ConsoleApplicationBuild\ConsoleApplicationBuild_20121210.23
DeploymentScriptDetails = agent1 | "$(BuildLocation)\Deploy.bat" $(BuildLocation) | c:\Env
LabEnvironmentUri = vstfs:///LabManagement/LabEnvironment/4
MaxWaitTime = 00:30:00
ThrowOnError = True
UseRoleForDeployment = True
Deployment Task Logs for Machine: win7testagent1
Access is denied
Exception Message: Team Foundation Server could not complete the deployment task for machine 'win7testagent1', script '"\\S0503TFS2T\TFSPlayground\ConsoleApplicationBuild\ConsoleApplicationBuild_20121210.23\Deploy.bat"', arguments '\\S0503TFS2T\TFSPlayground\ConsoleApplicationBuild\ConsoleApplicationBuild_20121210.23' and working directory 'c:\Env'. (type LabDeploymentProcessException)
Exception Stack Trace:
Server stack trace:
at Microsoft.TeamFoundation.Lab.Workflow.Activities.RunDeploymentTask.ExecuteDeploymentTask.RunCommand(AsyncState state)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at System.Action`1.EndInvoke(IAsyncResult result)
at Microsoft.TeamFoundation.Lab.Workflow.Activities.RunDeploymentTask.ExecuteDeploymentTask.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
显然,这是安全问题,我无法克服这是 MSDN 解释此过程的方式:
build-deploy-test 工作流启动构建,然后获取部署脚本。构建定义将构建文件复制到放置位置。工作流在脚本分配到的特定机器或机器角色的工作目录中运行每个部署脚本。每个部署脚本都从放置位置检索构建文件。每个部署脚本都将指定的构建文件复制或安装到实验室环境中的机器上。
此时问题出现了——工作流在特定机器的工作目录中运行每个部署脚本。
两台机器都在同一个域中,运行构建服务的用户也在远程机器的管理员组中。我什至与网络中的每个人共享了工作流应该复制文件/脚本的远程文件夹,但再次没有运气。
我正在做一些让我发疯的愚蠢事情 - 非常感谢任何帮助或想法!
最好的,雷达