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.