i have ran into this in the past, but we manage to solve this by assigning
a workspace for each build. there is a dsl -  ws().

Another thing regarding the executor while waiting for user input, use the
input(), outside of node{}.

https://stackoverflow.com/questions/37831386/jenkins-pipeline-input-step-blocks-executor






On Tue, Sep 5, 2017 at 2:14 PM, Craig Silverstein <csilv...@khanacademy.org>
wrote:

> 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
> <https://groups.google.com/d/msgid/jenkinsci-users/0cc87af6-82e8-4e17-9398-1fa93e9a684c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Regards
nirish okram

-- 
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/CAPzcO4h07OfOMSxG8dW8U2dBXYVRB_K3_egVazygb8%3DRntSdSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to