2
votes

I have a default agent on the build server and when it is run - it checked out the code in the server folders and running builds off it. Then I have another teamcity build agent installed on another machine (test server)

TeamCity Documentation says

"To be capable of getting project sources, Build Agents are not required to have any pre-configured Version Control System on them.

Build Agents don't need to have any VCS systems installed on them as the sources are checked out on the server-side. Thus, lesser effort is required to maintain the company's infrastructure."

The source is checked out server side - If an agent installed on a test server is run, will there be code check out in another new folder on the server ? or will it run builds off the same already existing code check out folders (the one the default agent on the server is working off)

1

1 Answers

1
votes

The former is true: TeamCity will check out a clean copy of code from source control for each VCS root/build agent combination, via the central TC webserver (if using server side checkout). Whether subsequent builds use the cached copy of sources or retrieve from source control again is based on a number of factors, including:

  • Whether clean checkout is turned on in the build configuration
  • Whether TC cleaned up your sources to free up disk space as part of an unrelated build
  • Build history cleanup rules (this definitely cleans up artifacts/previous builds, not sure about sources)
  • Other internal TC rules not understood by mere morals such as us

So to clarify, when using server-side checkout, the agent always relies on the server to retrieve the code from source control on its behalf, but the agents themselves are responsible for managing the source caches.