I’m using several matrix-jobs which usually contain the following steps:
Build, Install, Test
The Build-Step is set as a Touchdown-Step. The other steps are using the binaries created by Build.
I recently added another node to my system which should build these matrix-jobs too. Now my problem is, that Jenkins is distributing the steps of my job to these nodes.
Example:
1. Slave A runs the `Build` step and succeeds
2. Slave B runs the `Install` step and fails due to its dependency on the `Build`-results.
3. Slave A runs the `Test` step and succeeds, cause the dependencies are existing.
The execution of the matrix-job fails, cause its steps are distributed.
My question now is if there is any way to bind the execution of a matrix-job to just one node. It’s no problem if different executions are done on different nodes, but the steps of a certain execution should be done on a certain node.
It is no solution to bind the matrix-job to just one node. It still should be bound to a group of nodes.
Since you have these steps as individual jobs, in your “label” axis:
This will make sure that each of your steps runs on each individual slave, and therefore each step will have it’s predecessor’s workspace.
See:
http://imagebin.org/163627
==========================================================================
Based on comments:
At this point, you have two options:
You can use : https://wiki.jenkins-ci.org/display/JENKINS/Copy+Artifact+Plugin. You can add everything required as an artifact of your “build” step, and have your “install” step copy them over using the plugin. Do the same for “install” => “test”.
Combine your steps into a single job, since there is no guarantee that the same node will be “least used” for each step if they are different jobs. The only way to force all jobs to use the same node is by selecting individual node and not label.
Hope that helps…