Automatic removal of old builds and artifacts is great to avoid lots of data building up and filling disks. For some job that runs 0-5 times per day we might have this setting:
numToKeep: 20
daysToKeep: 10
But with this setting Jenkins will clean out historic data when EITHER of these criteria are no longer met.
For example, if there is low activity for a month (e.g. vacation period) it might happen that the job hasn’t run for 2 weeks. In this case Jenkins will delete all historic builds since they are older than 10 days. This is not wanted.
Is it possible to always keep a history of at least 10 builds AND at least 10 days?