unzip cannot overwrite read-only files

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

XMLWordPrintable

      When trying to unzip a file which already exists and is read-only, the unzip step fails.

      Happens on Linux and Windows slaves.

      Tested with:

      node("my_node")
      { 
      sh("touch file.txt")
      sh("rm -f file.zip")
      zip(zipFile: "file.zip")
      sh("chmod -w file.txt")
      unzip(zipFile: "file.zip")
      }

      I get the following output in blue ocean:

      Extracting from /data/jenkins/workspace/ZipTest/file.zip
      Extracting: file.txt -> /data/jenkins/workspace/ZipTest/file.txt
      /data/jenkins/workspace/ZipTest/file.txt

            Assignee:
            rsandell
            Reporter:
            Werner Wessely
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: