-
Bug
-
Resolution: Unresolved
-
Major
-
None
After upgrading Jenkins LTS (from 2.89.2 to 2.89.4) and several plugins yesterday we have an issue with hanging "bat" commands on windows nodes.
The following pipeline illustrates the issue:
node() { ws('D:\\') { bat 'echo Hello 1' } ws('D:/') { bat 'echo Hello 2' } }
The output is:
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] node
Running on XXX in C:\Jenkins\workspace\YYY
[Pipeline] {
[Pipeline] ws
Running in D:\src
[Pipeline] {
[Pipeline] bat
[src] Running batch scriptD:\src>echo Hello 1
Hello 1
[Pipeline] }
[Pipeline] // ws
[Pipeline] ws
Running in D:/src
[Pipeline] {
[Pipeline] bat
[D:/src] Running batch scriptD:\src>echo Hello 2
Hello 2
And the pipeline hangs here / does not finish ever.
So it looks like setting a workspace with a path containing a forward slash does not work anymore with bat commands.
I also tried the powershell command and that works without issues.
I've just hit this issue - I think. I'm using the Declarative syntax and this bat command is causing my builds to fail.
bat "git remote set-url --push origin ${env.GIT_URL_ORIGINAL}"
I too have switched it to powershell and it seems to be working again.
In my opinion, I think this bug should be more than minor, as I don't think it's easily identifiable as what would be causing builds to fail
Edit: Changed sample code from newer powershell version back to bat version