Creating a Cruise Control.net trigger using post-commit hook

I am looking for a way to initiate the build of Cruise Control.net from the post-commit subversion hook.

I want this to happen, to start the assembly immediately after fixing. I know about the usual way of doing this (server polling), but there seems to be no need to continue polling the server when this can be done using the hook.

One thought would be to invoke the โ€œForce Buildโ€ functionality on the control panel, but this will invoke the assembly even if all the changes are outside the trunk path tree, and therefore no changes have been made, which guarantees the assembly.

+4
source share
3 answers

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

The "Force build" functionality is the only mechanism I can come up with for this, however, if you only need changes from the trunk that require your post-commit to execute the equivalent of svn log (possibly verbose log), through then a suitable filter, then run "build power" only if necessary.

+1
source

Your idea of โ€‹โ€‹using Force Build is likely to work.

I do not understand your concern about modifications outside the route tree? Can you check this in a post-commit hook and only force build if the modified file is in / trunk

Do you find a flaw in this?

You have 2 sets of changes. You commit change set 1, start assembly, commit changeet2, and must wait for the build / test to complete before another assembly begins to build / test the changes.

0
source

I would recommend not to do this, but if you really want to, I will start with a URL trigger .

The URL trigger keeps track of any change URL, so you can just catch the error message for the html file. Also, if you use viewvc, you can track the following URL:

http://servername/viewvc/repos?view=rev&revision=HEAD 

This URL will be updated after every SVN commit

0
source

Source: https://habr.com/ru/post/1286023/


All Articles