pipeline zip step fails with absolute path

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

XMLWordPrintable

      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] }
      ...
      

            Assignee:
            rsandell
            Reporter:
            Mark Pictor
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: