I am running a Jenkins job on multiple slaves. Following is the code structure:
def branches = [:]
def allNodes = Jenkins.getInstance().getNodes()
for (int i =0; i < allNodes.size(); i++) {
branches[allNodes[i].name.toString()] = {
node(allNodes[i].name.toString()) {
.
.
stuff
}
}
parallel branches
Now, I want to get the status of the job parts running on nodes so that in case some job part fails on some node I can mark that node as offline. Is there any way to do this?