TeamCity default behavior on running the same build configuration multiple times

Hi,

I'm new to TeamCity so wanted to confirm what would happen if I trigger the same build configuration multiple times (manually/automated). My concern is regarding the working directory.

If I trigger the same build configuration again, while it is already running, is it possible for it to be allocated to the same agent? If yes, will each build configuration run have a dedicated working directory?

1 comment
Comment actions Permalink
Hello,
An agent will only process one build at a time, so an agent does not process more than one build simultaneously. If you trigger the same build configuration again and you have only one available agent that can run it, it will queue while the agent is finishing the current build.
If you have more than one agent and you want to control the number of simultaneously running builds, you can do it in the Build Configuration -> General Settings -> Show Advanced Options -> Limit the number of simultaneously running builds, that is set to 0 by default.
 
About the working directories, Build Agents use a set of working directories that are cleaned for each build or when the agent restarts.  The name of the folder is generated by a hash of the VCS Settings (+build config) on the build configuration, so a build configuration with an unchanging VCS config will always reuse the same folder (to reuse resources and waste less) unless configured to clean it. I would recommend you to read this very useful article:
 
If you have more questions, please let me know.
0

Please sign in to leave a comment.