-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins 2.32.1
pipeline 2.4
kubernetes-plugin 0.10
If pipeline has dir wrapper, i.e.
podTemplate(...) { node('pod') { container('mycontainer') { dir('my/dir/path') { sh 'ls -l' } } } }
shell step is still executed in the context of workspace root.
Same pipeline works as expected (within directory path specified by dir step) outside of kubernetes pod.
- is duplicated by
-
JENKINS-43188 kubernetes-plugin: cd command in shell-skript
-
- Closed
-
- is related to
-
JENKINS-33510 dir('foo') inside "docker.image().inside{}" does not affect CWD of launched processes
-
- Resolved
-
[JENKINS-40925] "dir" context is not honored by "sh" step
Description |
Original:
If pipeline has *dir* wrapper, i.e. {code} podTemplate(...) { node('pod') { container('mycontainer') { dir('my/dir/path') { sh 'ls -l' } } } } {code} *shell* step is still executed in the context of workspace root. Same pipeline works as expected (within directory path specified by *dir* step) |
New:
If pipeline has *dir* wrapper, i.e. {code} podTemplate(...) { node('pod') { container('mycontainer') { dir('my/dir/path') { sh 'ls -l' } } } } {code} *shell* step is still executed in the context of workspace root. Same pipeline works as expected (within directory path specified by *dir* step) outside of kubernetes pod. |
Link |
New:
This issue is related to |
+1 to this issue, observing the same