问题描述
我已将TFS 2010配置为进行构建并利用MSBuild参数,将其部署到单个服务器上而没有任何问题.
I've configured TFS 2010 to do a build and utilizing the MSBuild arguments, have it deploying to a single server without any issues.
/p:DeployOnBuild=True
/p:Configuration=Development
/p:DeployTarget=MSDeployPublish
/p:MSDeployPublishMethod=RemoteAgent
/p:MsDeployServiceUrl=http://<insert>/msdeployagentservice
/p:username=<insert>
/p:password=<insert>
但是,现在到了构建后要部署到多台计算机的地步.我不确定是否有一些内置的机制可以执行此操作,还是应该调用一个过程来启动批处理文件,并在此部署后进行同步?我希望保持整洁.
However, I am now to the point where I'd like to deploy to multiple machines after a build. I wasn't sure if there were some built in mechanisms for doing this, or should I invoke a process to launch a batch file that does this deployment followed by a sync? I was hoping to keep things neat and tidy.
例如,我可以有两个构建定义,每个服务器一个,但是这似乎很愚蠢.我希望能够一次完成两台服务器的构建,而无需过多的外部定制.
E.g., I could have two build definitions, one for each server, but that seems silly. I was hoping to just build to both servers in one fail swoop without too many outside customizations.
推荐答案
从TFS 2010开始,您可以使用构建定义模板自定义构建过程,这是配置构建过程的更丰富的方法.您不使用它有特定的原因吗?
As of TFS 2010 you can customize your build process using the build definition template, this is a much richer way of configuring your build process. Is there a specific reason why you're not using this?
这篇关于TFS 2010-构建后部署到多个服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!