Daily cleanup rules define which parts of the workspace and database should be cleaned up and which builds to clean up. One or more daily cleanup rules can be defined at each of the global, project and configuration levels. This allows you to, for example, clean up workspace files for a build several days before the build is removed from the build history in the database.
By default, there is one global daily cleanup rule, and this is applied to every configuration in Continua CI,
however, the rule can be overridden on either the project or configuration levels.
Note that description text is displayed in a tooltip as you hover over each of the acronyms in the Options column
If a project overrides a daily cleanup rule, then every configuration that belongs in that project will automatically inherit the project's daily cleanup rule rather than the global daily cleanup rule.
New cleanup rules can also be added at each level. New rules at the global level will be applied to every configuration; new rules at the project level will be applied to every configuration that belongs in that project.
Creating, Editing and Overriding Cleanup Rules
New daily cleanup rules can be defined by clicking on the [Create] link at the top fo the rules table. Existing rules defined at the current level can be edited by clicking on the [Edit] link to the right of the rule. Inherited rules can be overridden by clicking on the [Override] link to the right of the rule. In either case, the following dialog will be displayed:
The rule will only be run if it is enabled.
What To Cleanup
Define which build by-products to clean up with this rule.
Database: Tick this to completely clean up all database entries for each build. Alternatively, you may wish to choose to clean up specific entries associated with the build in the sub-categories below.
- Unit Tests: This will remove all unit tests associated with each build. Once unit tests have been deleted, they are no longer accessible through the build's unit tests page.
- Build: This will delete the main entry for each build from the build table and its child tables in the database. Once a build entry has been deleted, the build is no longer accessible through any of the build's pages and will no longer appear on the history or activity page. Selecting this will automatically select the Unit Tests option and all Workspace options.
- Statistics: This will remove statistics entries associated with each build so they will no longer contribute to the configuration's statistics and metrics. Selecting this, will automatically select all other options.
Workspace: Tick this to clean up all the files in the server workspace for each build. Alternatively, you may wish to specify the types of files to clean up from these sub-categories.
- Artifacts: This will delete all artifacts in the server workspace for each build. Once artifacts have been deleted, they are no longer accessible through the build's artifacts page.
- Logs: This will delete all build logs in the server workspace for each build. Once logs have been deleted, they are no longer accessible through the build's log page.
- Agent workspace: This will delete all files in the agent workspace for each build.
- Other Files: This will delete any other files copied to the server workspace for each build via the workspace rules.
All builds that are older than this time period will be removed when the cleanup runs.
This specifies the minimum number of builds that should be kept at all times, regardless of build age.
This specifies the maximum number of builds that should be kept at any one time, regardless of build age. If the number of existing builds is greater than this number then the oldest builds will be deleted.
Existing rules defined at the current level can be deleted by clicking on the [Delete] link to the right of the rule.
If deleting a project rule, then any overriding rules in configurations which belong to that project will remain on the configuration, but will no longer be an overriding rule. Likewise, if deleting a global rule, then any overriding rules in projects will remain on the project, but will no longer be an overriding rule. Also, any rules in configurations which directly override the deleted global rule, will remain on the configuration, but will no longer be an overriding rule.
Removing Rule Overrides
Overriding rules can be removed by clicking on the [Remove Override] link to the right of the rule.
Removing an overriding rule will not affect the overridden rule, which will then be inherited.
Excluding special builds from the cleanup
Builds can be excluded from the cleanup process so that they will never be deleted. Pinned builds are marked as important so they will be ignored when the cleanup is run. Check out the Builds page for more information on pinned builds including how to pin builds.