4

I have a number of daily and in-response-to-svn-change builds that all derive from the same configuration template. I can set it so I can choose what branch to look at, what build steps to carry out and of course what triggers the build.

However I would like the daily builds to do a completely clean checkout, whereas the svn dependent ones (that obviously happen throughout the day) I am happy for them to simply to an update.

Simply un-setting the option in the template does not let me set them in each of the derived builds. Is there a build parameter that I can use to switch on clean builds for those builds that require it?

Loofer
  • 6,841
  • 9
  • 61
  • 102

5 Answers5

3

In each Project's "Version Control Settings", look under "Checkout setting". There are options to specify the checkout dir and also a checkbox to clean files before a build.

savinderpuri
  • 293
  • 1
  • 7
  • They are grayed out in each project due to them being set in the template. I cannot see how to remove them from the template to allow individual projects to have their own settings. apologies if I was not clear. – Loofer Oct 18 '11 at 14:14
  • There's a way to declare variables in the template and substitute them with configuration parameters in each build project. Please refer more details at [link] http://blogs.jetbrains.com/teamcity/2010/10/14/overriding-template-settings/ – savinderpuri Oct 20 '11 at 09:22
  • Since you are dealing with templates, you might also want to look at http://youtrack.jetbrains.net/issue/TW-15182 – savinderpuri Oct 20 '11 at 09:32
  • @savinderpuri -1 None of this works - The OP is asking about a checkbox, and you can't parameterize a checkbox in the way you say – Ruben Bartelink Jul 31 '13 at 10:07
3

There is an Additional Build Feature (Swabra) you can add that does a clean checkout if required.I have enabled this for our nightly builds but have not yet investigated the consequences.

See here for more detail on Swabra

Loofer
  • 6,841
  • 9
  • 61
  • 102
  • For clarity, [in TC 6+, Swabra became built in functionality](http://confluence.jetbrains.com/display/TW/Swabra) (Although even the V8 docs doesn't make this tremendously clear) – Ruben Bartelink Jul 31 '13 at 22:42
2

I so disliked the Accepted Answer that I put a conditional scorch into my built script.

Then I you can either set a default in the template and override in the one that needs the scorching or define it on an opt-out basis.

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

Why answer with such an unsightly hack? I'm hoping someone will chime in with a real solution and [then downvote this or preferably] comment.

Ruben Bartelink
  • 59,778
  • 26
  • 187
  • 249
2

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

Orn Kristjansson
  • 3,435
  • 4
  • 26
  • 40
  • It seems a shame to duplicate all the rest of the build (which is shared) for just one bit! – Loofer Oct 19 '11 at 10:24
1

There's a way to declare variables in the template and substitute them with configuration parameters in each build project. Please refer more details at [link] http://blogs.jetbrains.com/teamcity/2010/10/14/overriding-template-settings/

savinderpuri
  • 293
  • 1
  • 7