Status: Open (View Workflow)
I've created a log discarder that acts similar to Jenkins' Log Rotation strategy to discard old builds. However, this log discarder will delete the logs for older builds, but does not delete build information such as when a build was started and how long it took for trend analysis.
I'm willing to submit a pull request!
This change will also mitigate the issue: https://issues.jenkins-ci.org/browse/JENKINS-48344
- is blocked by
JENKINS-52867 Offer File-agnostic Run API for deleting build logs
- In Review
- relates to
JENKINS-38313 External Build Log storage for Jenkins
- In Progress
JENKINS-48344 Log files generated by Jenkins pipeline scripts are bloated
- links to
The existing, mainstream implementation already includes a distinction between keeping artifacts and keeping the build. Adding another distinction to it about keeping logs seems consistent with the existing role/scope and would provide a generally useful option; especially in the context of
JENKINS-48344 or other cases where Jenkins users encounter disk space issues because of log size.
From that standpoint I'd rather see it in the main implementation than a separate plugin. Would the OP's pull request be considered?
Not sure what "OP" means in this case, but we consider all pull requests to the core. Obviously, we expect the changes to be done in a compatible way.
"Original Poster", I think I might be showing my aged Internet usage... should have used `@` mentions and said thyrex's pull request.
Original pull request from thyrex: https://github.com/jenkinsci/jenkins/pull/3545
In https://github.com/jenkinsci/jenkins/pull/3557 I have added Core API, which will allow implementing the Log rotator in a plugin. Once it is in the core, the custom Log rotator could be implemented in https://github.com/jenkinsci/buildrotator-plugin/commits/master or elsewhere (CC jimilian). But TBH I do not fully agree with jglick's comment in the original https://github.com/jenkinsci/jenkins/pull/3545 , IMO this functionality could be an advanced option in the core if done in a compatible way
I do not plan to work on it anytime soon, see https://groups.google.com/d/msg/jenkinsci-dev/uc6NsMoCFQI/AIO4WG1UCwAJ for the context. Everybody is welcome to work on it
BuildDiscatder is an extension point, so it can be implemented in a plugin.
Also https://github.com/jenkinsci/buildrotator-plugin which may address this use-case