I am using webdeploy to automatically deploy a application on a testserver via teamcity. Now once all test scripts are run I want to deploy it on Live servers. I have installed a web farm on server1(controller) and I have 2 other servers server2(primary) and server3(secondary) as web farm agents setup. Now how can I copy the publish done on testserver to my live sites on server2 and server3 and it do the load balancing. can any one please explain how I can Accomplish this task automatically using teamcity. or I am going the wrong way.
Please guide.
I would make a different job, that deploys to the production, that way you control when it deploys, but that depends on what it is, and how much.
If you are building a package with /t:package you can make it available through artifacts, and use
msdeploy -verb:sync -source:package="Path to package" -dest:auto
.In my "deploy to production" job I have this step, as a command line step: