The Auto Clean option available in the Package Definition is used to cleanup unwanted packages or packages that have already been deployed from the package root directory. This is done by deleting package results. When a package result is deleted it gets marked to delete the package from the package root directory, on the next create package request.
Steps for setting up and using auto clean:
- The package definition includes an Auto Clean option in the Options tab that should be selected.
- The packaging result associated with the package that needs to be cleaned should be deleted, thereby marking the actual package for deletion.
- Under the default setting the user will have to wait up to 30 minutes after the package result is deleted and then on the next Create Package… request, the Auto Clean will take place and all marked packages will be deleted.
Note: This happens because the “Build Result Pruner Task Fixed Delay (seconds)” runs every 30 minutes by default and checks for any package results that have been deleted and marks those packages for deletion. If a Create Package is requested before the pruner task has run, the packages will not be deleted and a subsequent Create Package will have to be requested.
Additional information on Auto Clean
- The 30 minute delay can be changed by changing the advanced property “Build Result Pruner Task Fixed Delay (seconds)” on the server in the Change and Configuration Management Advanced Properties page. Go to the Build System section and change the Current Value field of the Build Result Pruner Task Fixed Delay property and Click Save.
- A failed package is automatically removed from the package root directory even if you do not select the Auto clean option.