如何使用TeamCity构建后部署? [英] How to deploy after a build with TeamCity?
问题描述
我有我的项目设置,它从subversion正确更新,并建立好。
那么什么下一个?
理想情况下,我希望自动部署到测试服务器,手动部署到实时/分段服务器。
最好的方法是什么?
由于我正在使用C#/ ASP.Net,我应该将Web部署项目添加到我的解决方案?
本文介绍如何从TeamCity调用Microsoft的WebDeploy工具将Web应用程序部署到远程Web服务器。我一直在使用它来部署到测试Web服务器并在登记时运行selenium测试。
http://www.mikevalenty.com/automatic-deployment-from-teamcity-using-webdeploy/
- 安装WebDeploy
- 启用Web配置转换
- 配置TeamCity BuildRunner
- 配置TeamCity构建依赖关系
适用于我的应用程序的MSBuild参数是: p>
/ p:Configuration = QA
/ p:OutputPath = bin
/ p:DeployOnBuild = True
/ p:DeployTarget = MSDeployPublish
/p:MsDeployServiceUrl=https://myserver:8172/msdeploy.axd
/ p:username = myusername
/ p:password = mypassword
/ p:AllowUntrustedCertificate = True
/ p:DeployIisAppPath = ci
/ p:MSDeployPublishMethod = WMSVC
I'm setting up TeamCity as my build server.
I have my project set up, it is updating correctly from subversion, and building ok.
So what's next?
Ideally, I'd like to have it auto deploy to a test server, with a manual deploy to a live/staging server.
What's the best way to go about this?
Since I am using C#/ASP.Net, should I add a Web Deployment project to my solution?
This article explains how to call Microsoft's WebDeploy tool from TeamCity to deploy a web application to a remote web server. I've been using it to deploy to a test web server and run selenium tests on check-in.
http://www.mikevalenty.com/automatic-deployment-from-teamcity-using-webdeploy/
- Install WebDeploy
- Enable Web config transforms
- Configure TeamCity BuildRunner
- Configure TeamCity Build Dependencies
The MSBuild arguments that worked for my application were:
/p:Configuration=QA
/p:OutputPath=bin
/p:DeployOnBuild=True
/p:DeployTarget=MSDeployPublish
/p:MsDeployServiceUrl=https://myserver:8172/msdeploy.axd
/p:username=myusername
/p:password=mypassword
/p:AllowUntrustedCertificate=True
/p:DeployIisAppPath=ci
/p:MSDeployPublishMethod=WMSVC
这篇关于如何使用TeamCity构建后部署?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!