Jenkins Matrix Groovy Execution Strategy Plugin hangs if label is offline

大憨熊 提交于 2020-01-25 08:36:20

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!