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

unzip cannot overwrite read-only files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 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

            rsandell rsandell
            mrbernecker Werner Wessely
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: