-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What feature do you want to see added?
Given these requirements:
- Builds 10 days and younger are always kept, regardless of their position in the build history
- The 15 most recent builds are always kept, regardless of their age
- Discard everything else
Is it possible to implement with the build-history-manager plugin?
Here are some examples/test scenarios:
- Suppose my job has 1 run a day, for each of 20 days. We should end up with the last 15 runs kept.
- Suppose my job has 2 runs a day, for each of 20 days. We should end up with the last 20 runs kept (i.e. 2 runs a day for the last 10 days - runs older than 10 days are gone).
- Suppose my job has 2 runs a day, for the first 10 days, then 10 days without runs. We should end up with the last 15 runs kept (i.e. we're only keeping based on "The 15 most recent builds are always kept, no matter their age", because the other runs have been deleted).
- Suppose my job has 15 runs a day, for each of 20 days. We should end up with the last 150 runs kept (15 * 10).
It feels like we would need a BuildPosition condition, which compares against a monotonically-increasing counter of runs (assuming the latest run starts at 1), such that we would be able to craft the configuration to have the following rules:
conditions: [BuildPosition(maxBuildPosition: 15)], continueAfterMatch: falseconditions: [BuildAgeRange(maxDaysAge: 10)], continueAfterMatch: falseactions: [DeleteBuild()]
What do you think?
Thanks!
Upstream changes
n/a
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request