Overview
Project cleanup rules are used to define when historical build data is cleaned from the pulse™ host server. In a perfect world, the host would have enough disk space to retain all project build data forever. However, disk space is limited, and project data (particularly working directories) may consume hundreds of megabytes per build. Cleanup rules provide a flexible way of defining when data should be cleaned to preserve disk space.
Types of Project Data
For the purpose of cleanup, build data is split into two categories:
- The working directory for the build. This is the working copy checked out from the SCM, left in the same state as when the build completed. As the working directory will typically contain intermediate binary files, it may consume a large amount of space. For this reason, a default cleanup rule is put in place for all new projects that will clean up the working directory for builds more than 10 builds old. Retaining the working directory is useful for diagnosing build issues, and may usually be disabled for performance reasons.
- The entire build result. This refers to all artifacts captured during the build, along with the build result stored in the pulse™ database. Usually this takes up significantly less space, and ideally would never need to be cleaned. However, if disk space is limited, cleaning build results may be necessary. In this case it is best to clean up successful results most aggresively, as they are usually of less future interest.
When configuring a cleanup rule, you can choose if it applies to working directories only or the entire build result. In the latter case, the working directory will also be cleaned, as it is no use without the rest of the build data.
Application of Cleanup Rules
Each project has a list of cleanup rules. After each build is completed, and at regular scheduled intervals, each one of these cleanup rules is applied to the project's build history in turn. Whenever a cleanup rule matches a build result, that result (or its working directory) will be immediately cleaned.