On Thu, 20 Apr 2017, at 15:02, Danny Rehelis wrote:
> Help me understand this please, in case my Pipeline looks like this -
>
> stage ('Stage #1') {
> agent { label 'builder' }
> stage ('Stage #2') {
> agent { label 'builder' }
>
> Will the second stage run on the same builder labeled server instance
> (same one from first stage) or will pick any other possibly idle labeled server
> available at the time?
> Is it possible to force "stickiness" for explicitly configured agents?
In this case, there's no guarantee that the two builds will run in the
same workspace, or even on the same agent, if there are multiple agents
with the 'builder' label.
For stickiness, you'd probably have to define your `agent` once at the
top level of the Pipeline, and then maybe do `agent none` in the stages
where you don't need that agent (not entirely sure whether that works).
Regards,
Chris