views:

542

answers:

7

Currently I'm tasked with doing the daily build. We have an ASP.NET 2005 website with a SQL Server 2005 backend. Our current source control is Visual Source Safe 2005.

At this point, I use the brute-force method of daily builds.

  1. Get Latest version of source code
  2. Get Latest version of Database release script
  3. Backup old website files to a directory
  4. Publish new code to my local machine
  5. Run on my server to keep the test/stage site working
  6. Push newly created files to the website
  7. Run SQL Script on test database (assuming updates, otherwise I don't bother)
  8. Test website on the Test Server.

Looking at the idea of automated builds intrigues me since it means that I do less each morning. How would you recommend I proceed? I want to have a fully fleshed out idea before I present it to my boss.

+2  A: 

All of what you are doing can be performed by a set of batch files, depending on how automated your test environment is. The main batch file can be started as a 'scheduled task' at midnight or whatever. That's how we 'do it cheap' here and at other places I've worked. If you need help with a particular batch, I can provide a sample.

kenny
+5  A: 

Ditch VSS, move to Subversion, and check out CruiseControl.NET. Alternatively, if you have a MSDN developer license, you can run TFS workgroup edition and set up a build server on any old XP box. Its what we do at our shop.


As Assaf noted, you can use CC.NET with VSS directly. Nice.

Will
+3  A: 

Try CruiseControl.Net. It's free, and whatever customized daily/continuous routine you want it to perform you can always add with scripts.

Remember, it's not just about daily (nightly) builds, but also about letting you catch build errors in time (since it continuously builds after every source commit/check-in). You don't necessarily test every code chance on every possible platform and build configuration, but CC can do exactly that for you (in the background).


http://confluence.public.thoughtworks.org/display/CCNET/Visual+Source+Safe+Source+Control+Block

Assaf Lavie
I didn't know CC.NET could do this. Nice. Added link to docs about coniguring CC to work with VSS.
Will
+4  A: 

TeamCity has worked well for me. It has a very simple setup. Combine it with an MsBuild script for your operations and you're auto-matic.

Cristian Libardo
+1  A: 

I second (or third) the reccomendation for Subversion/CruiseControl.net. Also, if it is appropriate, check out hosted services for SVN like CVSDude. You'll probably become well versed with MSBuild in the process too. Once you get it setup it is great.

The cost doesn't come from licensing of the tools or even hardware necessarily, but from your time building and maintaining the system - and depending on what you are doing, that could become significant.

Start with the basics and incrementally improve it over time. Like anything else, if you try to come out of the gate with lots of automation and functionality you could find yourself mired in it fulltime for weeks.

MarkB
+4  A: 

For build management I wholeheartedly recommend TeamCity. It doesn't require IIS6 (like CC.net does) since it runs on it's own copy of Tomcat and the setup is all done thru various forms. This is a big deal to me since the build server is just an XPPro box. It integrates well with SVN and there is no crazy XML file manipulation like I had to do with CruiseControl.Net. Big win for me.

For a build runner we use NAnt to send emails to various people, copy the packaged builds where they're supposed to go, run NUnit and NCover, and deploy the software to our web farm.

For automated testing we use Watin.

http://www.nunit.org/index.php http://www.jetbrains.com/teamcity http://ncover.sourceforge.net/ http://subversion.tigris.org/ http://nant.sourceforge.net/ http://watin.sourceforge.net/

Jason Slocomb
+1  A: 

Whatever tools you use, house them in a virtual machine (ie., vmware).

When the equipment inevitably goes south, you can copy the image onto any machine and not miss a beat because your build server decided to take the day off, assuming of course, you back up.

Jas Panesar