开发者

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

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

Our current development setup uses ASP.NET, SVN, CCN开发者_JS百科ET 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.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜