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

Archiving artifacts should be skipped if the job was aborted

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      If the job was aborted manually the artifacts should not be archived (or there
      should be a configuration option to enable this functionality in the particular
      job).

          [JENKINS-3776] Archiving artifacts should be skipped if the job was aborted

          dl198383 added a comment -

          fix the summary.

          dl198383 added a comment - fix the summary.

          I guess I'm curious why you'd like such a behavior.

          Kohsuke Kawaguchi added a comment - I guess I'm curious why you'd like such a behavior.

          Andrew Bayer added a comment -

          This actually fits with some things I'd been thinking about - namely, the
          ability to turn off the auto-archiving of artifacts/javadoc/static
          analysis/coverage/etc for a project. For example, I've got a project which, in
          its nightly build, generates javadoc and then zips it up with an assembly. But
          Hudson (specifically the Maven plugin) sees the javadoc mojo fire, and
          automatically archives the Javadoc, whether I want it to do so or not. Or I'm
          running Cobertura in the project, but I don't have the Cobertura plugin enabled
          for the project in Hudson - and yet it still archives the Cobertura reports,
          because the mojo fired.

          I'm not sure if there's an elegant way to handle this, and it's probably not
          worth doing anything about unless there's an elegant way to handle it. But
          it's something to consider.

          Andrew Bayer added a comment - This actually fits with some things I'd been thinking about - namely, the ability to turn off the auto-archiving of artifacts/javadoc/static analysis/coverage/etc for a project. For example, I've got a project which, in its nightly build, generates javadoc and then zips it up with an assembly. But Hudson (specifically the Maven plugin) sees the javadoc mojo fire, and automatically archives the Javadoc, whether I want it to do so or not. Or I'm running Cobertura in the project, but I don't have the Cobertura plugin enabled for the project in Hudson - and yet it still archives the Cobertura reports, because the mojo fired. I'm not sure if there's an elegant way to handle this, and it's probably not worth doing anything about unless there's an elegant way to handle it. But it's something to consider.

          dl198383 added a comment -

          Well... I have several "heavy" jobs running on hudson, jobs that take hours and
          that produces several gigabytes of data which is published as the artifacts.

          From time to time I have to stop some job and restart it - e.g. when I have
          some fix available and need to test it quickly - without waiting when the
          running job finishes. So I abort the build and start it again.
          Skipping archiving artifacts will serve for 2 purposes - first, it makes the
          "restart" process be faster (archiving can take several minutes) and it also
          saves some disk space (a few GB). In such scenario I`m not interested in the
          artifacts that were produced in the not finished build.

          I can certain imagine the cases when archiving artifacts for the manually
          aborted job is necessary - e.g. if the job hanged (for some reasons) and the
          artifacts can help to diagnose the problem after the job in totally finished.

          dl198383 added a comment - Well... I have several "heavy" jobs running on hudson, jobs that take hours and that produces several gigabytes of data which is published as the artifacts. From time to time I have to stop some job and restart it - e.g. when I have some fix available and need to test it quickly - without waiting when the running job finishes. So I abort the build and start it again. Skipping archiving artifacts will serve for 2 purposes - first, it makes the "restart" process be faster (archiving can take several minutes) and it also saves some disk space (a few GB). In such scenario I`m not interested in the artifacts that were produced in the not finished build. I can certain imagine the cases when archiving artifacts for the manually aborted job is necessary - e.g. if the job hanged (for some reasons) and the artifacts can help to diagnose the problem after the job in totally finished.

          Alan Harder added a comment -
              • Issue 4014 has been marked as a duplicate of this issue. ***

          Alan Harder added a comment - Issue 4014 has been marked as a duplicate of this issue. ***

          Flominator added a comment -

          @dl198383104 ... and even IF you want to check the artifacts of an aborted
          build, you have them in the workspace until you start the next build. So you
          don't need to archive them, as well.

          Flominator added a comment - @dl198383104 ... and even IF you want to check the artifacts of an aborted build, you have them in the workspace until you start the next build. So you don't need to archive them, as well.

          Daniel Beck added a comment -

          Essentially duplicates JENKINS-22699 (the newer one has a PR already)

          Daniel Beck added a comment - Essentially duplicates JENKINS-22699 (the newer one has a PR already)

          Neel M added a comment - - edited

          I am not sure if this was a great idea and execution. Even if such behavior is necessary, it should have been implemented with an option to toggle it on or off. Alternatively, you could have simply stopped the archiving process programmatically if that was your goal. As it stands, this feature prevents archiving artifacts from working at all for aborted builds.

          Neel M added a comment - - edited I am not sure if this was a great idea and execution. Even if such behavior is necessary, it should have been implemented with an option to toggle it on or off. Alternatively, you could have simply stopped the archiving process programmatically if that was your goal. As it stands, this feature prevents archiving artifacts from working at all for aborted builds.

            Unassigned Unassigned
            dl198383 dl198383
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: