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

Second archiveArtifacts step fails silently with compress-artifacts-plugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • compress-artifacts-plugin 1.10
      Jenkins 2.73.2
      Windows Server 2012 R2

      I put two archiveArtifacts steps in a declarative Jenkinsfile but only the files archived by the first step show up in the Jenkins UI.

      dir('bin/Release') {
          archiveArtifacts artifacts: 'data/*.xml', fingerprint: true, onlyIfSuccessful: true
          archiveArtifacts artifacts: '**/*', excludes: '**/*.xml', fingerprint: true, onlyIfSuccessful: true
      }
      

      The build directory in the Jenkins master then contains both "archive.zip" with files from the first step, and "archive.zip.writing.zip" with files from the second step. I think the tempArchive.renameTo(archive); call in ZipStorage failed. There is a comment "TODO support updating entries", so this is apparently a known problem.

      However, if this kind of thing is not supported, then I think the build should at least have failed with an explanation in Console Output. I got no warnings there, and the build succeeded:

      [Pipeline] dir
      Running in CENSORED\bin\Release
      [Pipeline] {
      [Pipeline] archiveArtifacts
      Archiving artifacts
      Recording fingerprints
      [Pipeline] archiveArtifacts
      Archiving artifacts
      Recording fingerprints
      [Pipeline] }
      [Pipeline] // dir
      [Pipeline] }
      

            Unassigned Unassigned
            kon Kalle Niemitalo
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: