问题
I am trying to implement a more complex combination filter for Jenkins using the Matrix Groovy Execution Strategy Plugin. See my previous question for more details. It seems to work otherwise but if the nodes where the label is set are offline, the matrix job hangs and does not put the rest of the matrix items into the job queue.
This is enough Groovy to cause the same effect in the plugin:
combinations.each{
result[it.cfg] = result[it.cfg] ?: []
result[it.cfg] << it
}
return [result, true]
If I set the execution strategy to "Classic", all the job labels go into the queue even if some nodes are offline. I have "Execute concurrent builds if necessary" enabled if that makes any difference.
Is there some setting I need to fix or is this a plugin issue?
回答1:
Thats because the classic strategy puts all the keystone jobs in the queue and then the others afterwards.
This plugin will schedule them in sections and if the node is offline then they will wait, which is standard behaviour
you could try this
Note: I wrote the matrix execution strategy plugin
Incorporated comments
You can force all the combinations to submit in one go by doing the following:
combinations.each{
result["a"] = result["a"] ?: []
result["a"] << it
}
return [result, true]
来源:https://stackoverflow.com/questions/54362161/jenkins-matrix-groovy-execution-strategy-plugin-hangs-if-label-is-offline