简体   繁体   中英

how can I set up a continuous deployment with TFSBuild for MVC app?

I have some questions around the best mechanism to deploy MVC web applications to different environments. Previously I used setup projects (.msi's) but as these have been discontinued in VS2012 I am looking to move to an alternative.

Let me explain my current setup. I currently have a CI setup using TFSBuild 2010 with Team Foundation Server for source control.

A number of developers work on their local machines and check in to the TFS Server. We regularly deploy to a single server dev environment and a load balanced qa environment with 2 servers. Our current process includes installing an msi which carries out some of the following custom actions:

  • brings current app offline with the app_offline.htm file
  • run in database scripts (from database project in the solution)
  • modifies web.config (different for each web server of qa)
  • labels the code
  • warmup each deployed file via http request
  • etc

This is the current process. Now I would like to make some changes. Firstly, I need alternative to msi's. From som research I believe that web deploy via IIS and using MsDeploy is the best alternative. I can use web config transforms for web config modifications. Is this correct and if so, could I get an outline of what I need to do?

Secondly I want to set up continuous delivery via TFSBuild, I have no idea how this may be achieved, would it be possible to get an outline of how it can be integrated in to my current setup? Rather than check in driven, I would like it to be user driven following check in. Also, would it be possible for this to also run in database scripts from a database project in the solution.

Finally, there is also a production environment, but I would like to manually deploy this - can my process also produce an artifact that I can manually install?

Vishal Joshi has some information on his blog that is reasonably good, http://vishaljoshi.blogspot.com/2010/11/team-build-web-deployment-web-deploy-vs.html . It does have the downside that your deployment password is include in the properties you pass to msbuild.

Syed Hashimi has also posted some information on this in another questions Team Build: Publish locally using MSDeploy .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM