views:

4008

answers:

5

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.

+5  A: 

You might be interested in MSDeploy. Here's a Scott Hanselman post on this. It's only available as a technical preview at the moment (September 2008) but is worth evaluating against your requirements.

Iain
Hmm, although that seems very cool ... it doesn't seem to help the scenario of the automated build (unless I'm reading the docs wrong).
Joel Martinez
A: 

I had a related question about getting a deployable set of files from an automated build. I found Web Deployment Projects (links and all in the old question) did what I needed - they're a VS and MSBuild add-on.

Simon Steele
+2  A: 

Do you have the ability to run commands remotely? The PsExec utility from Systinternals would let run a command line unzip program on the remote machine. If you have a script that copies the build as a .zip file to the remote site, you would just need one more line for the PsExec call to unzip the files.

Chris Miller
+7  A: 

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 http://stackoverflow.com/questions/45783/automate-deployment-for-web-applications

Sam Wessel
A: 

There is another new build tool (a very intelligent wrapper) called NUBuild. Its lightweight, open source and extremely easy to setup and provides almost no-touch maintenance. I really like this new tool and we have made it standard tool for our continuous build and integration process of our projects (we have about 400 projects across 75 developers). Try it out.

http://nubuild.codeplex.com/

  • Easy to use command line interface
  • Ability to target all .Net framework version i.e. 1.1, 2.0, 3.0 and 3.5
  • Supports XML based configuration
  • Supports both project and file references
  • Automatically generates the “complete ordered build list” for a given project – No touch maintenance.
  • Ability to detect and display circular dependencies
  • Perform parallel build - automatically decides which of the projects in the generated build list can be built independently.
  • Ability to handle proxy assemblies
  • Provides visual clue to the build process e.g. showing “% completed”, “current status” etc.
  • Generates detailed execution log both in XML and text format
  • Easily integrated with Cruise-Control.Net continuous integration system
  • Can use custom logger like XMLLogger when targeting 2.0 + version
  • Ability to parse error logs
  • Ability to deploy built assemblies to user specified location
  • Ability to synchronize source code with source-control system
  • Version management capability
netbuild