added age-based build retention: artifacts.retentionMaxAge (e.g. 30d, empty = no limit) drops builds older than the given age; combines with retentionPerBranch as independent caps — a build is kept only while it satisfies both limits; a branch's newest build is never age-pruned and keepLatestGreen now shields the latest green build from both limits, keeping the permanent /branches/... links valid

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Michael Hoennig
2026-07-08 22:35:31 +02:00
co-authored by Claude Fable 5
parent b104eeee05
commit d0b38c557a
10 changed files with 246 additions and 9 deletions
+6 -1
View File
@@ -77,7 +77,12 @@ artifacts:
rootDir: ""
# number of builds to keep per branch
retentionPerBranch: 3
# Keep each branch's latest green (successful) build even beyond retentionPerBranch.
# Additionally drop builds older than this age; suffixes s (seconds), m (minutes), h (hours), d (days).
# Empty means no age limit.
# Combines with retentionPerBranch: a build is kept only while it satisfies both limits.
# A branch's newest build is never age-pruned, so dormant branches keep their last status.
retentionMaxAge: ""
# Keep each branch's latest green (successful) build even beyond retentionPerBranch and retentionMaxAge.
# This backs the permanent artifact URLs /branches/<branch-key>/... — they always serve
# the latest green build of a branch and stay valid while newer builds fail.
# The kept build is still dropped once its branch is deleted from origin.