Sunday, November 6, 2011

Hudson project "depends" on another project

I have Project A, and I want to execute Project B BEFORE I run A.

In Ant, I would simply say
target A depends="B"

In Hudson, they made it more workaroundish.

In Project B, enable "Trigger builds remotely (e.g., from scripts)", specify a token (eg TOKEN); to trigger the job you do:
wget http://localhost:8080/job/OSBProject1/build?token=TOKEN

In Widows (the Windows users commit often suicide) you can use Wget for Widows: http://gnuwin32.sourceforge.net/packages/wget.htm

see also here

An alternative is using the Parametrized Trigger Plugin and have a dummy Project C run B and A

All this is very silly, there should be a pre-dependencies and post-dependencies list.

No comments: