I have a jenkins pipeline script that does something like this:
```
node('master') { do_stuff(params.FOO); }
prompt "Look good?"
node('master') { do_more_stuff(); }
```

`do_more_stuff()` depends on workspace-changes made by `do_stuff()` (files 
created, repos synced, etc).

This worked fine when only one job could run at a time, but we recently 
changed it so you could run two jobs concurrently, and now have a problem 
that a single job could use different workspaces for `do_stuff` and 
`do_more_stuff`.  That is, job A could use workspace@1 for do_stuff but 
workspace@2 for do_more_stuff, if job B was using workspace@1 at the time.  
This causes the job to behave badly since the workspace isn't set up 
properly for `do_more_stuff`.

I could solve this by doing
```
nost('master') {
    do_stuff(...);
    prompt ...
    do_more_stuff(...);
}
```
but I'm trying to free up the executor while waiting for the prompt to be 
executed (it could be a while).

Are there any other ways to solve this problem?  What are the best 
practices here?  I feel I must be missing something in how `node` is 
supposed to be used.

craig

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0cc87af6-82e8-4e17-9398-1fa93e9a684c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to