unzip cannot overwrite read-only files

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Environment:
      Jenkins ver. 2.177
      Pipeline: Basic Steps ver. 2.16

      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
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: