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

Keep release build artifacts forever

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: release-plugin
    • Labels:
      None

      Description

      I just recently learned that "keeping a build forever" does not necessarily mean that it's artifacts are also saved forever.
      Right now I try to keep the number of saved artifacts to a minimum by selecting the "Discard all but the last successful/stable artifact to save disk space"-option, but this also deletes the artifacts of old release builds!

      It would be nice to have an option in the release build section that allows me to keep the artifacts for all release builds, no matter if the "Discard all but the last successful/stable artifact to save disk space"-option or the "Discard Old Builds"-option are selected or not.

      I have not found an easy workaround for this so far, that's why I created this issue.

        Issue Links

          Activity

          Hide
          petehayes Peter Hayes added a comment -

          I would think the right way to tackle this would be to change the core code to be pluggable in the area where it applies this logic so that the release plugin could help decide if the artifact should be kept or not. The alternative would be for the release plugin itself to capture the artifacts but that would be redundant configuration and waste even more disk space.

          It is really unlikely that I'll have the time to try to accomplish this one. Maybe someone else can pick this up?

          Show
          petehayes Peter Hayes added a comment - I would think the right way to tackle this would be to change the core code to be pluggable in the area where it applies this logic so that the release plugin could help decide if the artifact should be kept or not. The alternative would be for the release plugin itself to capture the artifacts but that would be redundant configuration and waste even more disk space. It is really unlikely that I'll have the time to try to accomplish this one. Maybe someone else can pick this up?
          Hide
          sit Emil Sit added a comment -

          This issue reveals that there are two ways to remove builds inside Jenkins... one is handled by the LogRotator class (which has settings like, keep builds for a certain number of days, and keep artifacts for a certain number of days) and the other is handled by the ArtifactArchiver class (which has this latestOnly option that the OP has described in the description). The problem could be considered that these two classes don't respect each other's logic and Jenkins does not bring a conflict between the two settings (e.g., ArtifactArchiver is configured to throw things away, but LogRotator is configured to keep things around for some period of time) to light for the user.

          Show
          sit Emil Sit added a comment - This issue reveals that there are two ways to remove builds inside Jenkins... one is handled by the LogRotator class (which has settings like, keep builds for a certain number of days, and keep artifacts for a certain number of days) and the other is handled by the ArtifactArchiver class (which has this latestOnly option that the OP has described in the description). The problem could be considered that these two classes don't respect each other's logic and Jenkins does not bring a conflict between the two settings (e.g., ArtifactArchiver is configured to throw things away, but LogRotator is configured to keep things around for some period of time) to light for the user.
          Hide
          sit Emil Sit added a comment -

          Re-classifying as a bug and bumping priority (apologies if it's not appropriate for me to do so).

          Show
          sit Emil Sit added a comment - Re-classifying as a bug and bumping priority (apologies if it's not appropriate for me to do so).

            People

            • Assignee:
              petehayes Peter Hayes
              Reporter:
              fredg02 fredg02
            • Votes:
              9 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated: