R – Multiple dependent projects in Continuous Integration Tools

continuous integrationhudson

How can one setup continuous integration server to build multiple dependent projects?

I want to setup continuous integration process for a project hosted on a mercurial repository. The project however, has a compile time dependency on another project hosted in a different mercurial repository (both hosted on Google).

Using Hudson, how can I setup the CI job for both projects (while passing the binary locations of one to the other project build script)? Does other tools handle it better?

Both projects are Java projects with Ant build scripts.

Best Answer

I'd suggest looking into Maven (or if you don't want to move to Maven, Ivy, which integrates with Ant) - it's not really the CI server's job to handle artifact dependencies like you're talking about.

That said, if you have two jobs on a Hudson server, say, job_a and job_b, you can configure job_a to archive its artifacts (including the jar file(s) you need in job_b), and then kick off job_b when it finishes. And then, within job_b, you can then use ant's get task to download the jar file(s) from http://hudsonserver/job/job_a/lastStableBuild/artifact/jarfile.jar (etc). There'll always be something at that location, since it's a symlink to the last stable build of job_a, so you don't have to worry about job_b running and not finding the jarfile it needs.