"dir" context is not honored by "sh" step

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Assignee:
            Carlos Sanchez
            Reporter:
            Roman Safronov
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: