The implementation for "Build on the same node" parameter in "NodeParameters.java" implies that the next job is triggered on a node with the same label.
According to the parameter name, I would assume the job to be triggered on the very same (identical) node!
The label is supposed to group nodes, e.g. running windows / suse. Further, a job can anyway be configured to run only on nodes with a specific label.
Example:
Jenkins with 2 Slaves:
Name: Slave1, Label: debian
Name: Slave2, Label: debian
4 jobs in a pipeline:
- should run on very same workspace(node), triggered with option "build on same node"
- A (checkout + build) -> B -> C -> D (release)
Scenario:
1. Slave2 runs A-D @Revision 10
2. Slave1 starts A @Revision 20
3. A triggers B on Slave1
4. B triggers C on Slave2 due to the label (and since less active?)
5. C does no checkout and runs @Revision 10
6. C triggers D on Slave2 @Revision 10
Result/Impact:
Release is done using Revision 10, instead of 20. Would not be noticed, unless someone compares the exact revisions/node names.
Workarounds (not very nice):
a) one workspace for each job, each job checks out
b) using unique labels for each node and configuring job to run on each label
Ideas:
1. Renaming parameter to "Build on node with same label" and providing new feature for execution on very same node
2. Changing the functionality to run on node with same name
|