Skip to main content

Hudson 1.122 and build/test matrix

Posted by kohsuke on July 27, 2007 at 3:04 PM PDT

I just released a new version of Hudson (1.122.) Along with the usual bug fixes and improvements, this version includes one note-worthy feature, which is what I call "matrix project."

Here's how this new job type is typically useful. Let's say you are developing the JAX-WS RI. This project needs its tests to run on many different environments. We need to test on Solaris, Linux, and Windows. We need to test with Glassfish, Tomcat, and Jetty. We need to test with JDK5 and JDK6. We need to test with two kinds of different StAX implementations. If you test all possible combinations, you have 36 different combinations. With free-style software project, you need to set up 36 different jobs that are almost identical to each other. This is clearly unmaintainable.

Matrix project is designed to handle situations like this. It lets you set up a single configuration with user-defined parameters, and when you tell Hudson to build it, it will build all the possible combinations of parameters and aggregate results for easier comprehension.

In addition to testing, this job type should be also useful for building a software project for multiple target platforms. For example, products like Glassfish need to be built on different target platforms to produce native binaries.

This is still a preliminary feature, so do expect some unpolished UIs/features and rough edges, but I do plan on improving this area, and your feedback would be always welcome.

Related Topics >>

Comments

Individual node axis not a useful as it could be: I've ...

Individual node axis not a useful as it could be:

I've eyed the "individual node" axis for a number of projects, but so far I have always had to back off of it because it won't limit itself to on-line nodes only.

We have a number of "under the desk" Jenkins instances and nodes come and go . . . if a single node is off-line, the job is stuck and cannot be run a second time unless the "hung sub-job" is removed from the queue by hand.

I tried to fix this today, by combining it with the following combination filter:

import hudson.model.*;Hudson.instance.getComputer(label == "master"?"":label).getNode().getChannel() != null

Unfortunately, while this works as expected in scriptler, the combination filter won't accept the import statement.

So close, yet so far.

Seems like "on-line nodes only" should be an option on Matrix jobs.

Frank

Hudson 1.122 and build/test

Using Multi-configuration project I have created 10 different jobs and now I wanted to execute the same jobs on the 10 different slaves at the same time. The 10 jobs are interrelated means 2nd is based on 1st, 3rd is based on 2nd and so on. Now here the issue is that the when I started the first job it will go to 2nd one only after it completes 1st on all the slaves.
What I wanted is that once the 1st job completes any of the slaves it should start the 2nd job of that slave instead of waiting for all the slaves to completes 1st job.
Can you please let me know how to achieve this or is there any kind of such feature is available in Hudson ?
Thanks in advance!
Hetal

Matrix project

Hi Kohsuke The matrix project is a cool feature. I am trying to use it to schedule multiple simulation jobs across multiple slaves (actually not a continuous integration activity). How does Subversion integration work with a matrix job? Does the svn project get checked out for each slave or each combination? Is it possible to add a build step that executes just once, not for each combination? (I'm thinking of a build step that builds something on a share that will be used by all combinations). Best regards David