BuildMaster retains a lot of logs; this is great when you need to debug what went wrong, audit deployments, and so on -- but it's not so great when you start running out of disk space. This is where retention policies come in.
Retention policies may be created that will allow the system to reclaim disk space and/or database space depending on the configured policy. Policies may be filtered by application, application group, or pipeline, and may also specify a time window that can be used to prevent the retention policy from executing its purge methods during normal operational hours.
There are 4 possible objects that can be purged by configuring a retention policy, and each may be filterable additionally by release status, release package status, and/or environment:
Note: purging either Releases and Packages will not purge artifacts from disk for those packages. To clean up the artifact zip files from disk, a second retention policy must be added with the option to "purge orphaned artifacts" checked.
Retention policies will only perform purges if the criteria specified in a particular policy is met. There are 7 main filters that apply to most purge objects:
Beyond these standard filter options, you may also configure additional retention filtering that prevents certain items from being purged regardless if they match the filters or not:
Additionally, there is an option for the purge Build Artifacts type that will also purge artifacts from disk no longer have a reference to them within BuildMaster. This setting will ignore any filters that may be applied and always delete all orphaned artifacts.
Retention policies may also be forced to run immediately, bypassing any day/time window restrictions.