new to teamcity, basic questions about single application / multiple build agents

I recently started a new position with a company that uses TeamCity 6.x.  I am not an ant expert, but I have put together several build scripts before.  I have looked at the documentation for TeamCity, and I have tried searching this forum, but I still haven't found answers to a couple of basic questions.

My scenario:

Someone has already created build scripts for a J2EE application, which currently is set up as a single script.  (I will try to chop the script into separate pieces later - right now just trying to get some breathing room, and I'm brand new to TeamCity.)  The current script compiles EJBs, populates a database, deploys components into an app server, clean up, etc.  Run time is about 25 minutes.

My questions:

1.  I have seen lots of entries about multiple build agents, but I assume those are still single-process agents.  I wanted to confirm my assumption that TeamCity doesn't have some super cool internal feature that will automatically multi-thread ant tasks to different agents.  I am assuming that I will need to create a separate build configuration for each discreet process I want (database operations; compile EJB; etc.).

2.  For TeamCity, what I have read seems to indicate that I should chop components into separate build scripts, and then use a Finish Build trigger at the end of each component to kick off the next component.  If I do this, can the Finish Build trigger indicate whether the next component should be on a different build agent?  I would like to try to build as much concurrently as possible, but after spending a couple of hours looking at TeamCity, I am not sure how to proceed to mock this up.  (Again, lots of references to multiple agents / multiple agents on the same machine, but I don't find much in the forum or documentation about concurrent builds.)

My end goal is to try to do as much as possible in parallel across multiple agents, so that I can cut down that 25 minute build time.  For those people that will respond "RTFM," I have spent a few hours trying to understand TeamCity, including reviewing this forum and the Jetbrains documentation.  It would be super awesome if my boss would let me spend 40 hours doing research...  I'm not asking for specific help, just pointers on how to accomplish a reasonably solid concurrent build process across multiple build agents without being a TeamCity guru.

Any suggestions or pointers are greatly appreciated.


Brent Friedman

Comment actions Permalink

The many entries on the forum with zero replies doesn't seem very encouraging.  My company already has an enterprise license for TeamCity, but it seems like switching to jenkins for continuous builds would be better.  At least I would probably get a response on the user forum.

Comment actions Permalink


Sorry for late response.

That's true. TeamCity does not provide special support for parallelization of build tasks within a single build configuration. All build steps are executed one by one, on the same computer.
We have simillar feature request in TW-16423, but it isn't so simple.
In your example steps depend on each other, so compilation, deployment and cleanup must wait till previous step is finished, and cannot be parallelized.

Automatic tests take most of build time, and sometimes it makes sense to cut part of them into separate build configuration.

For such kind of builds it's better to set artifact and snapshot dependencies between the build configurations, rather than Finish Build Trigger.
You can find detailed guide on these features in our recent blog post: TeamCity Build Dependencies.



Please sign in to leave a comment.