title: Jenkins Pipeline Utility Steps - zip zipFile
body: <p>I am trying to zip the folders which are created as output of my jenkins pipeline job using pipeline script. By googling i came to know the Jenkins </p>
  
  <blockquote>
    <p>Pipeline Utility Steps - zip zipFile </p>
  </blockquote>
  
  <p><a href="https://jenkins.io/doc/pipeline/steps/pipeline-utility-steps/#code-zip-code-create-zip-file" rel="noreferrer">https://jenkins.io/doc/pipeline/steps/pipeline-utility-steps/#code-zip-code-create-zip-file</a> to zip folders/files but could not get exact pipeline syntax to zip.</p>
  
  <p>In my job workspace, I have a folder by name 'Test' which has 2 sub folders as 'Test1', 'Test2'. Each sub folder will have .dll files. So, I would like to zip entire 'Test' folder with all subfolder.</p>
  
  
  
  <pre class="lang-groovy prettyprint-override"><code>node(Jenkinks_1)
  {
      echo "ZIP"
      zip zipFile: 'Test.zip', dir:'C:\\workspace\\Build_Sample\\Test'
      echo "END - ZIP"
  }
  </code></pre>
  
  <p>Below are the Console Output from Jenkins:</p>
  
  <pre><code>Started by user XXXXX
  [Pipeline] node
  Running on Jenkinks_1 in C:\workspace\Build_Sample
  [Pipeline] {
  [Pipeline] echo
  ZIP
  [Pipeline] echo
  END - ZIP
  [Pipeline] }
  [Pipeline] // node
  [Pipeline] End of Pipeline
  Finished: SUCCESS
  </code></pre>
  
  <p>Looking for some guidance to zip the folders using pipeline syntax. Appreciate your inputs.</p>
  
  <p>I wanted to zip some files as output of my jenkins pipeline job</p>