The cleanBuild program is invoked by the releaseManagerDaemon program to remove unnecessary directories from a build in order to conserve disk space.
When invoked, this program requires the --buildId flag to be specified with the buildId corresponding to a valid entry in the build database table. Thus all invocations must be of the form:
finishBuild --buildId <buildID>
where <buildId> is the build package to be worked on.
The program creates a list of all directories in the buildLocation (from the build table) for the specified build. It loops through the list removing all directories not specified in the excludeClean field in the settings table.
The excludeClean field is set for each package/versionType combination and specifies those directories needed for execution of the compiled programs. The cleanBuild program effectively removes all source code and intermediary build objects and just leaves the executables and necessary data files.
Note: This program does not currently run for any builds built by the Jenkins system as there has been no mechanism set up to trigger this program through Jenkins.