Using TeamCity build templates, how can I remove the "Clear all files before build" from the template?

I have a number of daily and in-response-to-svn changes that are all made from the same configuration template. I can configure it so that I can choose which branch to look at, what assembly steps to perform, and, of course, what causes the assembly.

However, I would like the daily builds to perform a completely clean check, while the svn-dependent ones (which obviously happen during the day), I am happy that they are just updated.

Simple removal of options in the template does not allow me to install them in each of the output collections. Is there a build option that I can use to enable clean builds for those builds that require this?

+4
source share
5 answers

It seems to me that you need one template for daily and one for nightly builds.

+2
source

In each project, “Version Control Settings,” see “Verification Settings”. There are options for specifying the verification directory, as well as a check box for cleaning files before assembly.

+3
source

There is an additional build function (Swabra) that you can add that does a clean check if necessary. I have included this for our nightly collections, but have not yet explored the consequences.

See Swabra here for more details.

+3
source

I did not like the accepted answer so much that I put a conditional burn in my built-in script.

Then I can either set the default value in the template, or override the one that needs scorching or determine it based on the failure.

Get-ChildItem . -Include obj,bin -Recurse -Force | Remove-Item -Recurse -Force Remove-Item Artifacts -Recurse -Force 

Why respond with such an unsightly hack? I hope someone calls back with a real solution and [then removes this or preferred comment].

+1
source

There is a way to declare variables in the template and replace them with configuration parameters in each build project. See [link] http://blogs.jetbrains.com/teamcity/2010/10/14/overriding-template-settings/ for more details.

0
source

All Articles