You can use 'stash' to solve this problem since you can't count on the same
workspace in part 3 as in part 1 nor, if it is the same workspace can you
count on it being unchanged in the interim. You can get confused by trying
it and maybe you do get it this time but not next time. Further, depending
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
ething along the lines of:
>> def sharedWorkspace = “/shared-workspace/${JOB_NAME}/${BUILD_NUMBER}”
>>
>> node(‘A’){
>>
>> ws(sharedWorkspace){
>>
>> //do stuff
>>
>> }
>>
>> }
>>
>> node(‘B’){}
>>
>> node(‘A’){
>
(sharedWorkspace){
>
> //do stuff
>
> }
>
> }
>
> node(‘B’){}
>
> node(‘A’){
>
> ws(sharedWorkspace){
>
> //do more stuff
>
> }
>
> }
>
>
>
>
>
> *From: *Robert Hales
> *Sent: *30 October 2017 03
Hales
Sent: 30 October 2017 03:04
To: Jenkins Users
Subject: Re: Using the same label multiple times in pipeline
If you have multiple nodes with a label of A, you will need to declare a
variable to hold the name of the specific node you ended up on in the first
"node" declaration, an
If you have multiple nodes with a label of A, you will need to declare a
variable to hold the name of the specific node you ended up on in the first
"node" declaration, and then use that node in the third one:
def allocatedNode
node('A') { allocatedNode = $NODE_NAME } //NODE_NAME is an environ
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 s