title: how to use tar in jenkins pipeline?
body: <p>I have an error in my code. I've confirmed that the file definatley exists with ls</p>
  
  <pre><code>sh 'ls node_modules/protractor/node_modules/webdriver-manager/'
  
  CHANGELOG.md
  CONTRIBUTING.md
  LICENSE
  README.md
  bin
  built
  config.json
  docs
  gulpfile.js
  package.json
  </code></pre>
  
  <p>Then I've tried to zip the directory but get this error:</p>
  
  <pre><code>sh 'tar -zxf selenium.tar.gz -C node_modules/protractor/node_modules/webdriver-manager/'
  
  tar (child): selenium.tar.gz: Cannot open: No such file or directory
  </code></pre>
  
  <p>I have read a previous article explaining it maybe to do with setting the PATH variable in Jenkins. I am not sure how to do that or what I need to add and where?</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/37248963/creating-a-tarball-using-jenkins">Creating a tarball using Jenkins</a></li>
  <li><a href="https://stackoverflow.com/questions/26958741/extract-tar-the-tar-bz2-file-error">Extract tar the tar.bz2 file error</a></li>
  </ul>
  
  <p>I am using windows 10, and this is a dockerized version of jenkins.
  Any advice welcome.
  thanks</p>