I'm setting up a TeamCity instance for a project that only uses Perforce for it's source control. In getting up to speed, I've seen some options that lead TeamCity to the p4 clean command to clean up the workspace, but other places where TeamCity only offers an option to delete and resync the workspace.
I'm making use of the scheduled trigger to run a nightly build from a clean workspace. However I've hit a few snags, and wanting to switch the trigger to use "p4 clean" instead of deleting the directory and resyncing. The snags are:
1. Delete and resync of course incurs the overhead of needing to sync everything, I'd like to avoid that need as a build requires at least 30GB of source/assets to be synced first.
2. When delete and resync happens, disk space isn't freed up. This has lead the build machine to run out of space overnight. It's looking like TeamCity may be renaming the workspace folder to .old, and only deleting it 2 hours after the scheduled trigger ran.
3. Not all builds should be run clean, we try and keep the CI builds during the day running incrementally.
So with all that said, is there a way to ensure TeamCity only runs p4 clean during a scheduled trigger, and otherwise runs without a clean or delete when the VCS trigger occurs?