timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-8392] Keep release build artifacts forever #6258

Open timja opened 13 years ago

timja commented 13 years ago

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.


Originally reported by fredg02, imported from: Keep release build artifacts forever
  • assignee: petehayes
  • status: Open
  • priority: Major
  • resolution: Unresolved
  • imported: 2022/01/10
timja commented 13 years ago

petehayes:

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?

timja commented 12 years ago

sit:

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.

timja commented 12 years ago

sit:

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

timja commented 2 years ago

[Originally related to: JENKINS-6166]