Trigger a Hudson build from Subversion on Windows
You can configure Subversion to trigger a build in Hudson when anything is commited into a repository. You do this by using the post-commit hook on your Subversion repository. Nearly all the samples i found work on a Unix/Linux machine. They all tell you to use something called wget, but wget is not something that comes with Windows. So you need to get a Windows version for it. Here is one that worked for me.
The content of the post-commit hook on your Subversion repository should look something like:
E:\programs\wget -b http://yourserver:8080/job/yourjobname/build
- Try to run this command from the command line first to see if it works properly.
- To find the proper URL to start a build in Hudson, go to Hudson and enter the job. Now you hover over the Build now option and at the bottom of your browser the URL is shown.
Easy startup batch file for Hudson
Recently i have been experimenting with Hudson. It’s quite easy to handle. You only need to download the hudson.war at the Hudson site, run it and connect to it with a browser at for example http://localhost:8080.
@echo off title hudson rem change drive and the directory (so double click on file works) %~d0 CD %~p0 rem create the data/configuration directory (if it does not exist yet) if exist data goto :aftermddata md data :aftermddata rem start hudson set HUDSON_HOME=%~d0%~p0\data java -jar hudson.war
Put this batch file and the war file in the same directory and just have a shortcut to the batch file or simply double click the batch file from your explorer. If there is no data/configuration directory yet, it will be created and Hudson will be started.