• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      Currently you can configure a job to keep either artifacts of all builds or only
      from the latest successful build.

      I have a job with quite large artifacts. I want to keep a long build history
      (logs and build times). Also I would like to keep the latest 5 artifacts (or so)
      to be able to analyze them etc..

      For this to work I would like to have an option in the artifacts settings:
      Instead of:
      [ ] Discard all but the last successful artifact to save disk space
      I propose:
      [ ] Keep only artifacts of the last [<number>] successful builds to save disk space

          [JENKINS-834] add option to keep a number of artifacts

          gradopado created issue -

          vijayj added a comment -

          I have the same requirement. I don't want to delete the build, because once you
          delete the build then you lose all your history then i won't be able to produce
          the metrics....etc.

          o We also move our artifacts into our centralized server using scp plugin, so
          there is no need for hudson to keep them once we moved.
          o As the data grow, hudson takes longer to load during the first time.

          vijayj added a comment - I have the same requirement. I don't want to delete the build, because once you delete the build then you lose all your history then i won't be able to produce the metrics....etc. o We also move our artifacts into our centralized server using scp plugin, so there is no need for hudson to keep them once we moved. o As the data grow, hudson takes longer to load during the first time.

          mdonohue added a comment -
              • Issue 2144 has been marked as a duplicate of this issue. ***

          mdonohue added a comment - Issue 2144 has been marked as a duplicate of this issue. ***
          mdonohue made changes -
          Link New: This issue is duplicated by JENKINS-2144 [ JENKINS-2144 ]

          gliptak added a comment -

          Or maybe offer configuration for the number of artifacts to keep. Thanks

          gliptak added a comment - Or maybe offer configuration for the number of artifacts to keep. Thanks

          Jesse Glick added a comment -

          There is now main/test/src/test/java/hudson/tasks/ArtifactArchiverTest.java so
          it would not likely be too hard.

          Jesse Glick added a comment - There is now main/test/src/test/java/hudson/tasks/ArtifactArchiverTest.java so it would not likely be too hard.

          I think this is also relatively easy to do as a plugin, which allows you to
          define a large amount of options for a desirable behavior.

          Kohsuke Kawaguchi added a comment - I think this is also relatively easy to do as a plugin, which allows you to define a large amount of options for a desirable behavior.

          mdonohue added a comment -
              • Issue 3343 has been marked as a duplicate of this issue. ***

          mdonohue added a comment - Issue 3343 has been marked as a duplicate of this issue. ***
          mdonohue made changes -
          Link New: This issue is duplicated by JENKINS-3343 [ JENKINS-3343 ]

          mdonohue added a comment -
              • Issue 1298 has been marked as a duplicate of this issue. ***

          mdonohue added a comment - Issue 1298 has been marked as a duplicate of this issue. ***

            abayer Andrew Bayer
            gradopado gradopado
            Votes:
            22 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: