1

I am running TeamCity 8.0.3 with 1 build plan that also includes MSTest builder.

the build server does not run a build agent, so the build artifacts are created on developer machines which are serving as build agents. or so i thought..

looking at the build server, under \ProgramData\JetBrains\TeamCity\system\artifacts\Team\MyBuild#\MStest i see 37 folders each with a separate set of assemblies, which is interesting because there are only 25 unit tests.

i have 3 build steps

MSBuild   Build file: src/mySolution.sln  Targets: default
Create Artifacts Dir   Command Line  Custom script: if not exist Artifacts\MSTest mkdir 
^^ creates artifacts dir on build agent
MSTest
^^ includes Permal.BSG.Manager.UnitTests.dll and runs ms test 2012 on build agent..

as far as i know it should all happen on build agent. not sure why the server is hoarding all those copies of assemblies??

Sonic Soul
  • 23,855
  • 37
  • 130
  • 196

1 Answers1

1

I'm a little bit confused by your question, but I'll try to provide a few answers:

  • If you are asking why the TeamCity server has a copy of your unit tests binaries at all, than you'll want to take a look at your artifact publishing configuration on the first page of your build configuration because it'll be configured to publish them, which isn't a bad thing unless you don't want them.
  • If you are wondering why there are so many copies of the artifacts on the build server, than either you are just seeing one directory for each build stored on disk with a directory named with the internal build number.
  • ... or your build script is creating a new directory on the build agent each time it runs and all the directories from previous builds are getting published again under the new build's artifacts, take a look at the "Clean all files before build" option on the VCS tab of the build configuration to ensure the build agent stays clean.
Jonathon Rossi
  • 4,149
  • 1
  • 22
  • 32
  • thanks Jonathon. it was creating multiple copies of binaries per build, and you nailed it in the last point "clean all files before build" fixed it.. curious why this feature wouldn't be on by default? after like 40 builds, each build started to take up 350 megs! why would anyone want to duplicate binaries of each previous build on each new build.. – Sonic Soul Dec 10 '13 at 13:37
  • @SonicSoul Incremental builds. Not very popular (or even needed) with C# because the C# compiler is really fast, but especially for C++, incremental builds can massively reduce the build time if your build scripts handle only rebuilding code that has changed as there isn't any side effects of running a build again with updated source code. Obviously you'd need to build into a directory where the name doesn't change each build. We actually set the `system.teamcity.agent.build.checkoutDir.expireHours` agent property to 0 on all agents to ensure they stay clean. – Jonathon Rossi Dec 10 '13 at 22:37