views:

154

answers:

3

I’m looking for some recommendations to do project building and deployment automatically.

Our current development setup uses ASP.NET, SVN, CCNET and an MSBuild script for the dev server build. I was thinking of switching over to Cruise instead of CCNET though I’m not sure if that gives me anything extra that I don’t have already.

What I’d like to automate is the process from after an automated build is done to updating the live site with the new changes. Site updates can include base site updates as well as client updates which can be code and/or database changes so the process needs to be flexible enough so it can handle those scenarios.

One of my sources of inspiration for this came from this video as well as the endless hours spent doing updates each month.

A: 

I have used Nant in the past with a lot of luck for similar tasks. You can kick it off using your automated build. (http://nant.sourceforge.net/)

If you want something more comprehensive you can check out wix (http://wix.sourceforge.net/)

Now are you really sure that everything an autmatic build kicks off you want to update the live site? Or do you mean that you kick off a build, using your cc tool, and then it generates a build to go live?

I would hate to have the live site update when somebody checked in a new version of a file.

Your database updates will probably be the most challenging aspect. However as long as what is checked in for the databvase update is a change script, it is not bad.

Development 4.0
We have 2 build types right now. One is a dev build and the other a release. Dev builds are run every xx minutes after a checkin of code and run the unit tests etc while a release is only when we kick it off and does most of what a dev build does but in release mode as well as tags it as a version in SVN.
Brian Surowiec
A: 

Sounds like the two major functions for deploying your code changes is: 1. Copying files and 2. Executing DB Script Changes. If you look at using MsBuild Community Tasks there are plenty of handy build tasks that can help you along the way. SqlExecute and RoboCopy sound like they would be all you would need to use. This would require you modifying your project files to extend their build behavior but once that is done you'd be able to "script" out the manual portion of what is being done.

Achilles
+1  A: 

For smaller or personal projects, I would recommend using something like the free (and excellent) TeamCity by JetBrains. Unit test automation, continuous integration, and rules for what happens after a build (including moving it around to different locations).

For larger teams, I've actually found a bit of build automation in the form of custom MSBuild tasks and RoboCopy works best. This nice combination between manually promoting builds between environments and using MSBuild & RoboCopy to automate parts of this process creates clean breaks between environments (with very few 'oops I didn't mean to push that there' mistakes). It also lets us have QA review builds before promoting.

Dan Esparza