Archive

Posts Tagged ‘msbuild’

Continuous Integration, without exception!

May 19, 2011 Leave a comment

I am a firm believer in Continuous Integration.  And by that I mean every Solution/Project should be built continually on a build server, automatically – without exception.  In the old days I remember having to step into maintenance on a project new to me, only to find the version of the app in source code control would not compile.  How frustrating, and time-consuming.  Thanks to continuous integration, those days are gone!

If it’s the first time you’re doing this, obviously it will require an investment of time.  You need to set up a build server (VM is perfect), install build tools on it, and then create scripts/catalogue your projects.  Once you’ve crossed this hurdle, adding in new projects as you go along is a piece of cake.  It’s a habit worth forming.  Your dev team will thank you for the automatic emails indicating what source was changed, by whom, and if the build succeeded or failed.  The immediacy of this notification means the dev who made the change can quickly make the correction as the subject is fresh in her mind.

Compiling code is just the first step.  You can automatically do a bunch of other things:

  • Build your database from scratch using the source files for each object (e.g. tables, indexes, stored procedures); The database features in Visual Studio are great for this.
  • Run tests including unit tests and integration tests
  • Deploy binaries / runtime to a test area

I hope to blog on all those points in later posts.  For an example of just how much you can do in a script run continuously, see this great blog post on Automated Testing with BizTalk Server. The point is you can and should do the entire enchilada if not on every build, at least daily.  It’s a mundane and repeatable task so why not let the machine do it for you?  It’s all about quality and agility.  We’re having to code changes at warp speed, and this will help maintain our professionalism.

So please take my advice and invest the time to set up an automatic build using your favourite tool (TFS, CruiseControl.NET, etc.).

-Krip

Categories: Agile, BizTalk Tags: , , , ,