Hello Christian,
I have dealt with this issue. I am actually giving a presentation on it later this month.
I don't believe it's a bug/issue as much as a design decision, with the idea being that if a single machine can pass a build, why run it on an identical machine?
Here is my solution:
Summary: We have a parent job that finds all online nodes that match a certain label, then foreach node, pass a downstream job a label specific to that node. We have the NodeLabel Parameter plugin installed.
Details:
We have 40 nodes named 'hl-combo-##' where ## is 01-40. Each of those nodes is also labelled 'harnesslab' and 'hl-combo-##'. In a parent job, using groovy, we search all online nodes that have that label:
jenkins.model.Jenkins.instance.nodes.each {
if (it.toComputer().online && it.assignedLabels.contains(new hudson.model.labels.LabelAtom('harnesslab'))) {
harnesslabOnlineNodes += it
Then after some other code, we do:
harnesslabOnlineNodes.each {
println 'Starting configure job for: ' + it.name
def nodeLabel = it.name params_with_label += new org.jvnet.jenkins.plugins.nodelabelparameter.LabelParameterValue('NODE_LABEL', nodeLabel)
def paramsAction = new hudson.model.ParametersAction(params_with_label)
boolean targetBuildQueued = job.scheduleBuild(5, cause, paramsAction);
This way, we end up queueing 40 parallel jobs, each pointing at 1 node, but if we were change anything about the node configuration or number, we wouldn't need to alter any code.
Hope this helps!
Any update on this issue? We are also experiencing the same problem.
200$ is up for grabs for solving this issue, see https://freedomsponsors.org/issue/609/job-with-nodelabel-parameter-plugin-does-not-build-in-parallel-on-all-nodes-which-share-a-label?alert=SPONSOR