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
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.