• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • kubernetes-plugin
    • 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.

          [JENKINS-40925] "dir" context is not honored by "sh" step

            csanchez Carlos Sanchez
            electroma Roman Safronov
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: