Has anyone had any success using Hudson (or another similar build system) with Perl?
views:
552answers:
5I've integrated Perl into several build systems, although not Hudson. Why do you want to use Hudson? Maybe there's another answer to your problem.
- Are you in a Java shop that uses Hudson for everything else?
- Is there some feature in Hudson that you really want?
- Are you avoiding other build systems for some reason?
For non-Java build scripts, I usually use Hudson's custom build script template. That is, I can specify a shell script in Hudson. From there, I can run GNU tools like make, configure, and I usually embed some echo's into the script, or redirect some output to a custom file, which I then package up in a special folder, and mark as a build artifact.
For example, I might,
cd src
perl Makefile.PL > ${WORKSPACE}/logs/makefile.log
make > ${WORKSPACE}/logs/make.log
for starters.
Then I could wrap up logs/** as build artifacts.
hello all, I tried in hudson but:
I have a script in perl on my server (windows): lets say: d\util\demo.pl I want to have it running in hudson. so I go to Hudson, create new job, go to: Build Execute Windows batch command and add: perl.exe d\util\demo.pl
I got this error: 'perl.exe' is not recognized as an internal or external command, operable program or batch file.
please help!
Having used Hudson and Java for a year or so, and Hudson and Perl for a few months, my preferance is for the former, and to make the latter behave liek the former.
Hudson is Java-centric, and works best out-of-the-box with Maven and Junit. However, it supports shell scripts, so you can easily do the usual perl Makefile.PL && make && make test
.
You can get much nicer results, though, if you use oen of the (newish) Perl test-result formatters:
perl Makefile.PL
make setup
prove --timer --recurse -m --harness=TAP::Harness::JUnit t/
The use of
TAP::Harness::JUnitwill integrate the Perl test results into Hudson, allowing Hudson to graph and report as if you were running a Java project.
You can easily surround the prove
line with calls to start/stop an Apache test server - see CPAN for Apache Test.