This documentation relates to QuickBuild 5.0.x
Select here if you are using a different version

Complicated Build Cleanup Strategy

Version 1 by Robin Shen
on Jun 05, 2013 14:40.


 
compared with
Current by Robin Shen
on Jun 05, 2013 14:40.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

 h1. Situation
 QuickBuild ships with two build auto-cleanup strategies of a configuration:
 # To reserve builds by certain number of days.
 # To reserve certain number of builds.
   
 However sometimes this is not enough. For instance, you may want that recommended builds never get deleted automatically while other builds follow the normal auto-cleanup strategy. The solution is to define maintenance configuration running at descired schedule running customized script to do the cleanup.
  
 h1. Demonstration
 # Visit the [demo configuration|http://demo.pmease.com/overview/127], and hit the run button several times to generate more than five builds.
 # Mark eldest build of the [demo configuration|http://demo.pmease.com/overview/127] as recommended if it is not.
 # Visit the [demo cleanup configuration|http://demo.pmease.com/overview/128], and hit the run button to perform cleanup for the demo configuration. The cleanup is intended to preserve latest three builds, with recommended builds remaining intacted.
 # After cleanup, check the [demo configuration|http://demo.pmease.com/overview/127], and you will find that all recommended builds are still there, but only latest three builds of other statuses are preserved.
  
 h1. Resolution
 # Switch to [step setting of the demo cleanup configuration|http://demo.pmease.com/settings/128/steps]. The master step is defined to execute a groovy script. The script loops over all builds of the demo configuration and delete all builds matching two conditions: not a recommended build and not the most recent three builds.
 # The demo cleanup configuration is also scheduled to run every night at 1:00AM to do the job automatically.