Pipeline-utilities step zip step includes output zip file

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

XMLWordPrintable

      If the zip file that you are creating is in the directory that you are zipping then you get an incomplete version of the output zip inside the archive.

      example pipeline DSL.

      node {
          deleteDir()
          touch file: 'afile.txt', timestamp: 0
          touch file: 'bfile.txt', timestamp: 0
          zip dir: '', glob: '', zipFile: 'thing.zip'
          dir ('directory') {
              touch file: 'cfile.txt', timestamp: 0
          }
          v = unzip dir: '', glob: '', read: true, zipFile: 'thing.zip'
          println v
      }
      

      Console output

      Extracting from c:\j\jobs\MyPipeline\ws\thing.zip
      Reading: afile.txt
      Reading: bfile.txt
      Reading: thing.zip
      [Pipeline] echo
      {afile.txt=, bfile.txt=, thing.zip=PK!	afile.txtPKPK!	bfile.txtPKPKNcˆH	thing.zip}
      

            Assignee:
            rsandell
            Reporter:
            Russell Gallop
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: