I was asked by email what my current CI setup is, and did I have a blog post about it. Um, actually, no. Oops. So, here it is. As always, it's a work in process, and there are lots of unfinished rough edges. It's also got some phenomenally cool stuff too Thus, without further ado, my current setup for Continuous Integration:
CruiseControl.NET which runs on SVN commit that runs an NAnt build script which runs:
- MSBuild on one or more solutions
- aspnet_compiler.exe on all the websites (to validate the code in the markup)
- Use YUI Compressor to compress CSS files and compress and combine JavaScript files (yes, the irony isn't lost here)
- NUnit tests including:
- Fire up Cassini on each site and insure a carefully selected page doesn't blow chunks. (e.g. no configuration or initialization errors on each site.)
- Database / code integrity checks like do the enum values match the lookup table content. (I realize they're mostly integration tests, and cheesy at that, but it's a far cry better than the previous state of zero tests and "hope it works out" deployment.)
- Deploy content to test server(s), calling iisreset and stopping / restarting services as necessary.
- Label the CI build via svnrevisionlabeler (so the build number in CCTray matches the SVN version number).
- Email out to those who want the spam how the build did. (Personally I prefer data pull mechanisms like CCTray.)
There's also an SVN commit trigger that generates a commit email and sends it out.
That's what I've got now.
What I want to add to this (given another 257 hours in the day):
- JSLint validation of .js files and hopefully script tags in html
- CSS validation of .css files and hopefully style tags in html
- HTML validation to match the page's doctype of .aspx and .html pages
- SEO evaluation of .aspx and .html pages by crawling the site
- Database migration via Tarantino or RedGate's Sql Compare Pro & Sql Data Compare Pro
Once I've got these in place, I'll be confident that the code functions and is of descent quality before I deploy it to the test servers. Granted, I haven't validated that it functions correctly, only that it functions completely. The next step will be to look to Selenium Grid to validate JS works cross-browser and that various pages function as expected. I hope by then I can also kick-start the the idea that writing unit tests to validate the code functions as expected is also a good idea.
Add a bit of duct tape, a sprinkle of insanity, and that's my CI setup. Cheers.
Rob