Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
Jenkins 2.32.1
pipeline 2.4
kubernetes-plugin 0.10
Description
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.
Attachments
Issue Links
- 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
-
I'm looking at the code of org.jenkinsci.plugins.workflow.steps.PushdStep.Execution#start and org.csanchez.jenkins.plugins.kubernetes.pipeline.ContainerExecDecorator#decorate and it look like context is just ignored by LauncherDecorator.
I want to try to fix this issue.
csanchez can you please add at least basic steps on how to configure integration test environment for this plugin?