0
votes

So far I have set up my build with the "Clean Workspace" option set to "All". It is a "Rolling Build", since TFS server and Build server are not fast enough (or we have too many checkins) for "Continuous Builds".

Since getting the source always takes several minutes I want to change now to "Clean Workspace" mode "Outputs" or "None".

Still, I am worried that over time I might get inconsistencies with what I have checked out when not deleting, so I would like to do an automatic clean build every so often. Like every 10 builds, or every night.. but with the same build definition (and/or on the same folder of the build machine). (I am using only 1 build agent on the machine.)

(I am planning to do an extended nightly build with testing etc. anyway and could do a clean build there and use that feedback again for my other build.. but I would like the process to be as automated as possible.)

How to get a good mix between speed and reliability?

1
I have been running a build which only cleans outputs for years and never had an issue. I don't think reliability is a big concern. - gregpakes
I had frequent problems on a local machine. Though I must admit that there were major changes to the source on the server, plus different users used the system, which I suppose completely confuses TFS if you use different logins. (That would be the "test-development-machine" that is shared by all developers.) Solution would then be a "GetLatest" with forced overwrite and re-get of everything. - Andreas Reiff
The problems usualy arise from editing content - adding, removing, offline etc. If your build definition is not switching to new branches and there is no sneaky pre/post build tools running to mess up source. Since this is a CI build - it expectedly will have stable forward momentum you should have no problems. To cover realiability you could add a custom activity to your build that once in a while (check build history when last one happened) will override the workspace setup and do full clean - drk
Thanks for the idea. Good to find out that that is possible with custom activities. Only problem with that one is that it is only triggered by checkins, so.. since I don't expect checkins during the night and only want to clean during the night (since the getlatest takes 10 minutes+) I might simply go for a scheduled event. - Andreas Reiff

1 Answers

1
votes

I prefer clean builds all the time. It does prevent a certain class of errors from happening. I can understand though your need for speed, in that case your plan of running a full clean on a nightly more involved build would be a good safety measure. It may not catch an error immediately, but it would catch it by the end of the day making the number of check ins you have to evaluate for the problem more reasonable.

I really have to ask though, if you have so many check ins and it requires so much build time how do you still only have one agent on one machine. My preferred solution to this issue would be to add build agents and still do a fully clean build.