Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Step-By-Step ASP.NET Automated Build/Deploy

Seems like there are so many different ways of automating one's build/deployment that it becomes difficult to parse through all the different scenarios that people support in tutorials on the web. So I wanted to present the question to the stackoverflow crowd ... what would be the best way to set up an automated build and deployment system using the following configuration:

  • Visual Studio 2008
  • Web Application Project
  • CruiseControl.NET

One of the first things I tried was to have CCnet automatically zip the output and copy it to the server, but then that requires manual work to unzip at the destination. However, if we try to copy all the files individually, then it could potentially take a long time if it's a large application (build server lives outside of the datacenter in our office ... I know).

Also of particular interest is how we would support multiple environments as we have dev, qa, uat, and then of course prod.

MSDeploy seems really interesting, but unless I'm interpreting the literature incorrectly, doesn't help in the scenario of deploying from the output of a build server. If anything, it seems like it'll be useful in deploying one build across a build farm ... but even for deploying from one environment to another, one would have to manually change config settings and web service URLs, etc.

like image 971
Joel Martinez Avatar asked Sep 11 '08 22:09

Joel Martinez


People also ask

What is build & deployment process?

Deploy should mean take all of my artifacts and either copy them to a server, or execute them on a server. It should truly be a simple process. Build means, process all of my code/artifacts and prepare them for deployment. Meaning compile, generate code, package, etc.


1 Answers

I recently spent a few days working on automating deployments at my company.

We use a combination of CruiseControl, NAnt, MSBuild to generate a release version of the app. Then a separate script uses MSDeploy and XCopy to backup the live site and transfer the new files over.

Our solution is briefly described in an answer to this question Automate Deployment for Web Applications?

like image 78
Sam Wessel Avatar answered Oct 05 '22 18:10

Sam Wessel