TeamCity: Cleanup

In our TeamCity setup our BuildAgent ran out of disk space.

To find the problem I had to learn how our setup was.

It was a single server with two folders:

  • Program folder in c:\teamcity
  • Data folder in c:\programdata\jetbrains\teamcity

TeamCity setup

The BuildAgent was inside the Program folder.

The BuildAgent was running two tasks:

  • Build (called Main branch Build)
  • Deploy (called Deploy to ITest from Main branch)

The output of the Build task was built in the temp folder (task output folder) of the BuildAgent and copied to the system folder of the data folder, when completed.
The output was a Nuget package (.nupkg)

The Deploy task copied the .nupkg to the work folder (task input folder) of the BuildAgent.

Those .nupkg files were never removed during the cleanup. The cleanup was only cleaning up the Data folder.

In Deploy task Settingss – Dependencies, Artifact Dependencies the source file was copied to
With this: *.nupkg => Packages
There was an option to delete files in destination with “Clean destination paths before downloading artifacts”.

That option deleted the older .nupkg files before copying in the new .nupkg file.

TeamCity Dependency

The End.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: