A simple plugin, that helps to get free space for builds by deleting:
~/.m2/repository
~/.gradle/caches
~/.npm
(on Posix) or%AppData%/npm-cache
(on Windows)- arbitrary directories defined in
teamcity.cleaners.configurable.directories
property (comma-separated,~/
replaced with home directory) - or
~/.ivy2/cache
folders. These locations are known to grow very large over time, especially on long-living build agent.
Also it provides a simple cache with following properties:
- it can be used by build steps via reference to
system.agent.persistent.cache
TeamCity parameter - it survives agent restarts
- it will be cleaned if free space is required. Top level folders will be deleted one by one based on last update time, until enough space is free.
โก This plugin will delete files from build agent!
* To build locally, checkout and run `mvn package`Just drop zip target\caches-cleanup-plugin.zip
into <TeamCity_data_dir>/plugins