Creating tags or branches for Subversion based on Hudson builds

Hudson has a builtin mechanism for tagging. Using this default mechanism helps a lot. However if you have multi-module jobs, you could still be stuck making the same changes in all those paths. Especially when you want to create branches instead of tags. Of course these manual changes are very errorprone. Especially when you are in a hurry. So it can be improved and that’s what this Ant script is about. Read more

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

Some tips

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.

By default Hudson creates a data/configuration directory in your user directory. I do not like this when i’m experimenting. I also want to start Hudson manually. So i created this batch file.

@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.