How to deploy after a build with TeamCity?
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
I've written a pretty long blog post on this very topic that may interest you:
basically:
- install web deployment projects
- add web deployment project to your solution
- setup the solution configuration manager to have a "Deployment" build configuration
- get team city to use this build switch when running the build
- have a beer and wonder in glory at your automagical awesomenesss
Typically what I do is to create a Wix installer. A Wix project can be build with MsBuild so you should have no problems there.
Also I would recommend looking at the following MsBuild extensions for the automated deployment:
http://www.codeplex.com/MSBuildExtensionPack
http://msbuildtasks.tigris.org/
I hope this helps.