Has anyone had any success using Hudson (or another similar build system) with Perl?
-
20-09-2019 - |
Question
Has anyone had any success using Hudson (or another similar build system) with Perl?
Solution
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.
OTHER TIPS
I'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?
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.
Yes, someone has had success with another similar build system.