What is a good build automation and deployment process for use with asp.net?
Asked Answered
L

3

9

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.

Landlady answered 19/2, 2010 at 22:31 Comment(1)
Just an update after 6 years; Application release automation tools are specifically designed for exactly this. BuildMaster is one of the tools out there and this tutorial outlines the process mentioned.Lithoid
W
4

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.

Update 7/31/2014:

I've used custom TFS build templates with success. They're a bit complicated, but you can do quite a few cool things with them.

For open source projects (like NuGet libraries) hosted on GitHub, I don't think you can beat AppVeyor. I've got a few projects like Mailchimp.NET that have complete build and NuGet deploy automation.

Worn answered 2/3, 2010 at 17:53 Comment(1)
I've now upgraded, finally, from CruiseControl.NET to TeamCity and love it. This has been far easier to use even with custom MSBuild scripts.Landlady
F
0

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.

Freehold answered 19/2, 2010 at 23:24 Comment(1)
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.Landlady
K
0

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.

Kyles answered 2/3, 2010 at 17:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.