I've set up some rather large C++ projects to do integration builds in CruiseControl.NET, using MSBuild.
Now I'd like to schedule a complete Clean of the working directory once a night. How can I do that with CC.NET ?
I've set up some rather large C++ projects to do integration builds in CruiseControl.NET, using MSBuild.
Now I'd like to schedule a complete Clean of the working directory once a night. How can I do that with CC.NET ?
We created a script that deletes everything in the source directory and placed it in the prebuild step:
<prebuild>
<exec>
<executable>Clean_Source.bat</executable>
<baseDirectory>SourceDir</baseDirectory>
</exec>
</prebuild>
You can create a project that cleans your working directory at specified time.
<project name="CleanWorkingDir">
<triggers>
<scheduleTrigger time="23:30" buildCondition="ForceBuild" name="Scheduled"/>
</triggers>
<tasks>
<exec executable="c:\projects\myproject\build.bat"/>
</tasks>
</project>
Use the clean copy on the source control block, everything is already done for you. All you have to do is set it to true. If you really just want a project to clean that directory, then don't have any build tasks. However, as a matter of good release engineering you really should use cleancopy with all your individual builds. Otherwise, you cnanot be sure the build would work on an absolutely clean machine.