Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51515

Downloaded (zipped) Artifact seems to be corrupt, if compress-artifact is active

      Hi!

      I'm testing the current jenkins-version with compress-artifacts and copyartifact 1.40 (which implements ArtifactManager). This new release of the copyartifact-plugin works with this new version of copyartifact, but there's a small issue on the download artifacts UI:

      If I download the complete build-artifacts (URL: http://localhost:8080/job/Test/lastSuccessfulBuild/artifact/*zip*/.zip) a file with the name "zip.zip" will be downloaded [without compress-artifacts, the name is archive.zip].
      This Zip-archive contains an additional root-node/folder '_' an all other files and folders are located under this node. Therefore, the Windows-explorer shows no content after download (within the builtin ZIP-viewer).
      7-Zip (for example) seems to interpret this root-node as additional - but unnamed - folder-hierarchy; e.g. If I go into _ -> output of [...]\Downloads\zip.zip this is shown as [...]\Downloads\zip.zip\\output\

      Additional notes:

      Example of origin [...]\builds\lastStableBuild\archive.zip:
      file1.txt
      folder/
      folder/file2.txt
      
      Downloaded zip.zip - content (nodes), seems to be:
      _/
      _/file1.txt
      _/folder/
      _/folder/file2.txt
      

      This additional root-node is not included in the origin archive.zip file, which is created by the compress-artifacts plugin in the build-folder. There's also no root-node '_', If I go into a sub-folder (if any) of the artifacts and download this "sub-part" of archived files as Zip-archive.

      Note: IMHO, it's an minor issue but users may think, that the downloaded archive is corrupt, if they see no content in the builtin Zip-viewer of the Windows-Explorer after download.

      Best regards from Salzburg,
      Markus

        1. archive.zip
          0.3 kB
        2. config.xml
          2 kB
        3. screenshot1.png
          screenshot1.png
          15 kB
        4. zip.zip
          0.3 kB

          [JENKINS-51515] Downloaded (zipped) Artifact seems to be corrupt, if compress-artifact is active

          Thanks for the report, please attach a config.xml of a reproducing job s owe can have a look.

          Oliver Gondža added a comment - Thanks for the report, please attach a config.xml of a reproducing job s owe can have a look.

          Thanks for the quick response!

          Okay, I've attached the (very, very simple) job-configuration file (config.xml), the origin artifacts-file [...]/builds/1/archive.zip (note: compress-artifacts-plugin used) and the (from UI) downloaded archive zip.zip (which contains the additional root/folder-node '_').

          In addition, I've attached a (partial and annotated) screenshot screenshot1.png of the UI - URL: http://localhost:8080/job/TestArchiveDownload/1/artifact/ , from where I've downloaded the attached file zip.zip.

          Best regards from Salzburg,
          Markus

          GMC Software Development B&R Corporate added a comment - - edited Thanks for the quick response! Okay, I've attached the (very, very simple) job-configuration file ( config.xml ), the origin artifacts-file [...] /builds/1/ archive.zip  (note: compress-artifacts-plugin used) and the (from UI) downloaded archive zip.zip (which contains the additional root/folder-node '_'). In addition, I've attached a (partial and annotated) screenshot screenshot1.png of the UI - URL: http://localhost:8080/job/TestArchiveDownload/1/artifact/  , from where I've downloaded the attached file zip.zip . Best regards from Salzburg, Markus

          Hi!

          The command-line tool unzip shows warnings (about absolute path spec):

          >unzip -o zip.zip
          Archive:  zip.zip
          warning:  stripped absolute path spec from /subdir/file2.txt
            inflating: subdir/file2.txt
          warning:  stripped absolute path spec from /file1.txt
            inflating: file1.txt
          

          GMC Software Development B&R Corporate added a comment - - edited Hi! The command-line tool unzip shows warnings (about absolute path spec): >unzip -o zip.zip Archive: zip.zip warning: stripped absolute path spec from /subdir/file2.txt inflating: subdir/file2.txt warning: stripped absolute path spec from /file1.txt inflating: file1.txt

            olivergondza Oliver Gondža
            gmc_devel GMC Software Development B&R Corporate
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: