Skip to content

.cci.jenkinsfile: add build discarder to rotate logs#4498

Merged
dustymabe merged 1 commit intocoreos:mainfrom
marmijo:build-discarder
Mar 19, 2026
Merged

.cci.jenkinsfile: add build discarder to rotate logs#4498
dustymabe merged 1 commit intocoreos:mainfrom
marmijo:build-discarder

Conversation

@marmijo
Copy link
Member

@marmijo marmijo commented Mar 18, 2026

Limit build history to the 10 most recent runs or 30 days. This keeps PVC storage space down when there are long-running PRs in this repo with frequent force-pushes.

Written by the Pipeline-Syntax Snippet Generator in the Jenkins UI.


See coreos/fedora-coreos-tracker#2122

It's highly likely that when this PR merges, Jenkins will immediately rotate builds to keep the total number at 10 and also rotate builds that are older than 30 days. This will probably bring the PVC storage usage down even more and prevent us from having to manually clean things up in the future.

As an example, #4375 was previously consuming 6.8GB (27% of our total capacity) due to 157 builds. Under this new policy, that footprint would be capped at ~450MB.

Limit build history to the 10 most recent runs or 30 days. This keeps
PVC storage space down when there are long-running PRs in this repo with
frequent force-pushes.

Written by the Pipeline-Syntax Snippet Generator in the Jenkins UI.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a buildDiscarder to the Jenkinsfile. The goal is to limit the build history to the 10 most recent runs or builds newer than 30 days, which will help manage storage space. The implementation uses the standard logRotator function and appears to be correctly configured. The changes are straightforward and I have no suggestions for improvement.

Copy link
Member

@jbtrystram jbtrystram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice ! Thanks @marmijo

Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dustymabe dustymabe merged commit 486c64b into coreos:main Mar 19, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants