On 30.10.2017 03:50, Daniel Becroft wrote:
Hi,
I'm experimenting with the scripted pipeline, and have a question about the use of node('') with a label. If I have the following scenario:

node('A') { }
node('B') { }
node('A') { // Which node will be used here? }

Is there any guarantee that the second node() step for "A" will hit the same slave as the first one, or will it use whichever slave is now available? I'd like for the first node() to allocate one from the pool of slaves with the label of "A", but then the second one to somehow reuse the first one (there might be some cleanup tasks, etc that need to happen on the original node).

I would try something like this:

node('A') {
  ...
  ...
  node('B') {
    ...
    ...
  }
  ...
  ...
}

HTH and best regards
        Andreas
--
Andreas Tscharner                             [email protected]

Gordon's Law:
If you think you have the solution, the question was poorly phrased.

--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/2ca95dc7-20f3-385e-bf87-c88dd8888ef5%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to