-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins 2.32.1
Kubernetes plugin: 0.10
Example:
Create pipeline job named "i like spaces":
podTemplate(label: 'app', containers: [containerTemplate(name: 'docker', image: 'docker:1.11', ttyEnabled: true, command: 'cat')]) { node('app') { container('docker') { sh 'pwd' } } }
ER: Output includes "/home/jenkins/workspace/i like spaces"
AR: Output includes "/home/jenkins"
Workaround: rename job to exclude spaces (i.e. "i_like_underscores")
[JENKINS-41287] Workspace is set incorrectly for the job with whitespaces in its name
Description |
Original:
Example: Create pipeline job named "i like spaces": {code} podTemplate(label: 'app', containers: [containerTemplate(name: 'docker', image: 'docker:1.11', ttyEnabled: true, command: 'cat')]) { node('app') { container('docker') { sh 'pwd' } } } {code} ER: Output include "/home/jenkins/workspace/i like spaces" AR: Output includes "/home/jenkins" Workaround: rename job to exclude spaces (i.e. "i_like_underscores") |
New:
Example: Create pipeline job named "i like spaces": {code} podTemplate(label: 'app', containers: [containerTemplate(name: 'docker', image: 'docker:1.11', ttyEnabled: true, command: 'cat')]) { node('app') { container('docker') { sh 'pwd' } } } {code} ER: Output includes "/home/jenkins/workspace/i like spaces" AR: Output includes "/home/jenkins" Workaround: rename job to exclude spaces (i.e. "i_like_underscores") |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
the issue is here
https://github.com/jenkinsci/kubernetes-plugin/blob/master/src/main/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/ContainerExecDecorator.java#L125
you need escaping while `cd`