Hi Antonio,
So what I think you're saying, is that every workspace assigned is allowed
to contain anything - from other jobs, and always deleteDir() should be
used if a clean environment is needed?
Is there a way to request a empty workspace, that is also deleted after the
node{} block completes when using the Pipeline plugin?
- James
On Tuesday, 21 June 2016 16:30:22 UTC+1, Antonio Muñiz wrote:
>
>
> On Tue, Jun 21, 2016 at 3:20 PM, James Read <[email protected]
> <javascript:>> wrote:
>
>> It seems that actually the Pipeline makes the whole Jenkinsfile 1x
>> logical job, and the node{} blocks just allow different node selections
>> during that job.
>
>
> Not. Every `node` call has its workspace (and it can be erased at any time
> by Jenkins core, so you never know if the workspace contains what you
> think). Which means that the Jenkinsfile has to be idempotent and don't
> rely on workspace contents from previous builds. Actually every node block
> should remove/put whatever it needs (you can move things from one node to
> another by using `stash`).
>
> If you request for two nodes in the same Jenkinsfile using different
> labels, you would be using two nodes with two separated workspaces (even in
> different physical machines!).
>
>
> --
> Antonio Muñiz
> Software Engineer
> CloudBees, Inc.
>
--
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/77432682-e150-469f-bef9-fc28297ddbb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.