Wednesday 13 July 2016

TeamCity + Cake



I have been meaning to do it for a while, but finding time to move away from using the built in TeamCity build steps to using a build automation system has always been difficult. While everything was just working fine in TeamCity switching over to external, source controlled, build scripts kept dropping down the priority list.

Well I finally found the time over the last few days, and spent a few hours reproducing all the steps undertaken in TeamCity within a build script. I decided to go with Cake for the build system - I've used psake in the past and while I really like it, I can see a lot of good things happening around Cake. Also, many of the steps I was using in TeamCity, such as MSBuild Runner, NuGet Pack, and Octopus related steps are all available built-in in Cake.

Given that all the projects built in TeamCity use a common build step template, it was very easy to migrate to a fairly common build.cake file. The next step will be to make a truly generic build.cake file, share it between projects, and supplement it with project specific configuration, but for now I'm pretty happy to have fully migrated all the build steps into the build script, along with versioning, which was also previously driven from TeamCity build parameters (now a combination of a version string in source control + TeamCity build counter).

I would definitely recommend checking out http://cakebuild.net/ to see whether you could use it for your .NET build system requirements.



0 comments :

Post a Comment