Re: Using the same label multiple times in pipeline

2017-11-03 Thread Lee Meador
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

Re: Using the same label multiple times in pipeline

2017-11-02 Thread Andreas Tscharner
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

Re: Using the same label multiple times in pipeline

2017-10-30 Thread Daniel Becroft
ething along the lines of: >> def sharedWorkspace = “/shared-workspace/${JOB_NAME}/${BUILD_NUMBER}” >> >> node(‘A’){ >> >> ws(sharedWorkspace){ >> >> //do stuff >> >> } >> >> } >> >> node(‘B’){} >> >> node(‘A’){ >

Re: Using the same label multiple times in pipeline

2017-10-30 Thread Robert Hales
(sharedWorkspace){ > > //do stuff > > } > > } > > node(‘B’){} > > node(‘A’){ > > ws(sharedWorkspace){ > > //do more stuff > > } > > } > > > > > > *From: *Robert Hales > *Sent: *30 October 2017 03

RE: Using the same label multiple times in pipeline

2017-10-30 Thread Daniel Butler
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

Re: Using the same label multiple times in pipeline

2017-10-29 Thread Robert Hales
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

Using the same label multiple times in pipeline

2017-10-29 Thread Daniel Becroft
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