sometimes clean, sometimes nonclean

Hey.

I have several buildconfigurations that each run a specific testsuite against my program. My program is an artifact dependancy for each testconfig.
I care about speedyness, so I'd like nonclean rebuilds from my program to test against, so I get asap feedback on any changes in svn.

I also have several installer buildconfigs. These are my final releases. My program is an artifact dependancy for these installers as well.
Since these are releases, I do want clean rebuilds of my program for these.

I'm trying to figure out what the best way is to set this up.  I would really like to not have to create two buildconfigs for my program (one building clean, and one building nonclean), as my program buildconfig has about 12 buildconfigs that are artifact dependencies to it, so I would have to duplicate all of those.

I would love to be able to specify "Requires Artifact provider to be cleanly built" option,  when editing an artifact dependency of a buildconfig.

I'm hoping there is a comfortable way to create a setup like this.

Thanks, Lucas

6 comments
Comment actions Permalink

Bump.

Anyone? I'd love to hear about _any_ way to get this config running, even ones that aren't elegant

Thanks, Lucas

0
Comment actions Permalink

Lucas,

So far TeamCity has two "levers" for clean checkout:"Clean all files before build" which applies for all builds and "Enforce clean checkout" which can be invoked manually from Build Configurations actions. If you need something different, you will probably need either to handle checkout in your build script or write TeamCity Java plugin to perform necessary actinos when you need them.

A reasonable workaround seems to invoke "Enforce clean checkout" from outside of TeamCity (e.g. see related doc section). This can probably be performed from another build.

0
Comment actions Permalink

Hi Yegor,

Thanks for your reply.  Looks like I'm in trouble.

It seems like the "Clean all files before build" is not the right way to go here, as this is a persistent setting of a build configuration. I'd end up turning them all off and all on all the time.

"Enforce clean checkout" seems more promising. I'd need to find a way to:

1) call this for my buildconfig, and all buildconfig it depends on (recursively)
2) make sure that my actual builds get executed immidiately after this.  If something else slips into the buildqueue, my build will very likely still not be clean.

Is there a way to actually do #2?

It would be great if in a future version of TeamCity, the "Does this build need cleaned sources" would actually be a property of a "build invocation", and not of the actual buildconfig. (allthough that could provide a default).  I'm somewhat surprised not to find this feature, as I would guess I"m not the first guy who wants his release builds to be fully clean, but wants very fast iteration builds during development nonetheless.  Are other users just making dupes of all buildconfigs? or do they just accept slow build times by making everything clean sources all the time?

Bye, Lucas

0
Comment actions Permalink

Like you I would like an option to clean the build overnight as it takes 20/30 minutes longer compared to an incremental build without having to duplicate all the build configurations, so you are not alone.
For now I am triggering a clean build manually, but I would rather not rely on me (or someone else) remembering to do so.

0
Comment actions Permalink

Lucas,

I filed your feature request as TW-10139 - you can vote for/watch it.

So far I can only suggest to copy all the configurations (e.g. extract them in a separate project - you can use "copy project" for that).
Another workaround may be to play with "clean checkout" actions invocations in TeamCity...

0
Comment actions Permalink

Alex,

I filed an issue that might address this: TW-10138
But if there are several agents this will not help much since new sources will be checked out on a single agnet only. Addition of TW-4940 might help here.


I'd also recommend to try our experimental cleaning plugin: Swabra. It can delete new files created by the build (and report on modified ones)

0

Please sign in to leave a comment.