0

I have a pipeline where it runs on node which has label 'build'. In this pipeline if it fails any stage on one node it retries all the stages again in same pipeline on different nodes..

what I do in the pipeline is when a stage is failed I add label 'bad' to the node so that it doesn't get picked up on retry

i use label expression as 'build&&(!bad)'. But the thing is it retries on same node, when checked the node labels it contains label bad but jenkins still chooses same node...

What I observed is jenkins is taking some time to get labels updated..so after adding label 'bad' i still see the node listed for label expression 'build&&(!bad)' but after sometime that node is not listed..

what I need is, is there a way to refresh the nodelabel cache or reload config so that it gets all the latest labels..

0 Answers0