R – Trigger Cruise Control.net build using post-commit hook

continuous integrationcruisecontrol.netsvn

I'm looking for a way to trigger a Cruise Control.net build from a subversion post-commit hook.

I want this to in order start the build directly after an commit.
I know about the normal way of doing this (polling the server) but it seems unnecessary to keep polling the server when it can be done using a hook.

One thought would be to invoke the "Force Build" functionality of the dashboard but this will trigger a build even if all modifications is outside of the trunk path tree and therefore no modification have been made which warrant a build.

Best Answer

The problem with filtering changes is exactly why CC.NET uses the polling mechanism. (That, and the fact that there may be some scenarios where it is desirable to include new changes from multiple developers in the build.)

The "Force build" functionality is the only mechanism I can think of to accomplish this, however if you only wanted changes from the trunk that would require your post-commit hook to perform the equivalent of an svn log (possibly a verbose log) piped through some appropriate filter setting, then trigger the "force build" only if needed.

Related Topic