views:

348

answers:

1

I have tried googling for an way to do this but can't seem to find one so here goes.

I have a VisualSVN server set up with my repositories and cruisecontrol setup to poll the server and run the build scripts when ever there is a modification.

Since it is only me working on this project (it's my final year project as part of my degree) I don't think CC needs to poll the Server very often as only I will be checking in modifications.

So what I want is for VisualSVN to call the Force Build method of CruiseControl with a post-commit hook. This way I know the build will be run everytime I commit a change.

Both VisualSVN and CC are running on the same server if that makes a difference.

+2  A: 

click "force build" on your CC interface and copy the URL prepare a batch script that calls wget and call this batch script from the hooks\post-commit script of your repo. use modification set in CC config for this project.

the drawback of this solution that if you perform few consequence commits, cc will be triggered for everyone of them.

The alternative solution could be make svn touch some file on every commit and configure CC to use this file as a trigger.

Moisei
Thanks, that seems to be the best way forward.
Morgeh
An work-around, to make users doesn't wait CC runs, is post-commit.bat call start another bat/exe that calls CC. I use this to cal svnsync "async".
Zote
This is not relevant: wget will just trigger cc and exit. Now, on your side - be careful with your solution: if svn sync takes time for some reason and few consequence commits are arriving quickly each after other, you can end up with several batches running in background and executing svnsync at the same time that could break svnsync locking.
Moisei