-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
docker jenkins:alpine 2.46.2
Windows, manual installation 2.46.3
pipeline name: Spaces and 'Fancy' "Symbols"
pipeline script:
node ('master') {
sh "ls -la"
}
error:
Started by user xaseron
[Pipeline] node
Running on master in /var/jenkins_home/workspace/Spaces and 'Fancy' "Symbols"
[Pipeline] {
[Pipeline] sh
[Spaces and 'Fancy' "Symbols"] Running shell script
sh: can't create /var/jenkins_home/workspace/Spaces and Fancy "Symbols"@tmp/durable-2e345778/pid: nonexistent directory
sh: can't create /var/jenkins_home/workspace/Spaces and Fancy "Symbols"@tmp/durable-2e345778/jenkins-log.txt: nonexistent directory
sh: can't create /var/jenkins_home/workspace/Spaces and Fancy "Symbols"@tmp/durable-2e345778/jenkins-result.txt: nonexistent directory
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished: FAILURE
I had a similar problem. I created a folder called "Del's Testing area" and job "MyStream-main" with no display name for the folder. Jenkins removed the single quote from the folder name but there seems to be another place in the code that is using it with the single quote.
[Pipeline] node
Running on TESTSERVER in /opt/perforce/workspace/Del's-Testing-Area/MyStream-main
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Build-Release-Linux64-TESTSERVER)
[Pipeline] pwd
[Pipeline] echo
/opt/perforce/workspace/Del's-Testing-Area/MyStream-main
[Pipeline] sh
[MyStreamt-main] Running shell script
sh: 1: cannot create /opt/perforce/workspace/Dels-Testing-Area/MyStream-main@tmp/durable-42e4d590/pid; jsc=durable-8c9234a2eb6c2feded950bac03c8147a; JENKINS_SERVER_COOKIE=$jsc /opt/perforce/workspace/Dels-Testing-Area/MyStreammain@tmp/durable-42e4d590/script.sh: Directory nonexistent
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished: FAILURE
As a fix, could I suggest that if special characters or spaces are using in the Name field, then on apply or save the "display name" field should be set to this and the name field changed to only have the characters [0-9a-zA-Z_-]? I believe this solves the problem.
NB: This problem does not seem to affect Windows nodes via the "bat" step; everything just works as expected. Only the sh step seems to have this issue.