Even on a separate node, the 'env' will cause the 'sh' task to hang. For 
example, I have a windows slave and master:

node('windows-doc') {
    echo "On my Windows slave"
    env.PATH = "C:\\Program Files (x86)\\MadCap Software\\MadCap Flare 
V10\\Flare.app;%PATH%"
}

node('master') {
    echo "On master"
    sh "ls -l"
}

Remove the 'env.PATH' from that, and it will not hang. I'm running on 
1.580.3 LTS release line.

Checking to see if there's a bug for this. Very frustrating.

On Wednesday, February 11, 2015 at 8:33:25 AM UTC-5, Christoph Vogtländer 
wrote:
>
> Hi, 
>
> I'm trying to append a path to env.PATH and then executing a "sh" step. 
>
> node('Linux') { 
>    env.PATH = "/my/path/:${env.PATH}" 
>    sh 'echo "$PATH"' 
> } 
>
> env.PATH now contains "/my/path:null" and the "sh" will hang (I can see 
> that the temporary script is created successfully in the workspace, but 
> Jenkins does not seem to be able to execute it). No output is generated 
> in the step (just the circular progress indicator will be shown). 
>
> When not setting env.PATH everything works as expected and the output 
> will be: 
> Running shell script 
> + echo 'Path: /usr/bin:/bin:/usr/sbin:/sbin' 
> Path: /usr/bin:/bin:/usr/sbin:/sbin 
>
>
> Changing the above code to: 
> node('Linux') { 
>    env.PATH = "/my/path/:/usr/bin:/bin:/usr/sbin:/sbin" 
>    sh 'echo "$PATH"' 
> } 
>
> will solve the problem. Is this expected behaviour? 
>
> Thanks 
> Christoph 
>
>
>

-- 
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/e9cf69a1-1a4c-4c96-8780-3dcdd401717f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to