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

pipeline zip step fails with absolute path

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      It appears that the zip step prepends an absolute path to the zip file name when trying to upload, resulting in an error if you passed in an absolute path.

      In scripted jenkinsfile:

      zip zipFile: "${WORKSPACE}/my.zip", archive: true, dir: "${WORKSPACE}/some/dir"
      

      Console output:

      ...
      [Pipeline] zip
      Writing zip file of /var/build/workspace/job_branch-123random123/some/dir to /var/build/workspace/job_branch-123random123/my.zip
      Zipped 7 entries.
      Archiving /var/build/workspace/job_branch-123random123/my.zip
      Retrying upload after: java.io.FileNotFoundException: /var/build/workspace/job_branch-123random123/var/build/workspace/job_branch-123random123/my.zip (No such file or directory)
      
      ### Retry repeats many times ###
      
      Retrying upload after: java.io.FileNotFoundException: /var/build/workspace/job_branch-123random123/var/build/workspace/job_branch-123random123/my.zip (No such file or directory)
      Aborted by User Name
      [Pipeline] }
      ...
      

        Attachments

          Activity

            People

            Assignee:
            rsandell rsandell
            Reporter:
            mark999 Mark Pictor
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: