trainline / consul-deployment-agent

Cross-platform deployment agent for Environment Manager
Other
1 stars 0 forks source link

Remove old deployments #24

Closed DavidIHunt closed 7 years ago

DavidIHunt commented 7 years ago

This removes the entire directory of the last deployment rather than just the /archive sub-directory. Without this disks are filling up fast because the bundle.zip and /logs still remain. Those bundles are usually quite big. 5-10 deployments is enough to use up over a gigabyte of disk in some cases.

Note: Ideally we would clear away all directories which are not the latest successful deployment because, even with this PR, failed deployments will still remain.. But that's a larger change and I'm not familiar enough with this code. Suggested changes to this PR are more than welcome.

duncanhall commented 7 years ago

Looks ok - are there any sensible tests we could add around path concatentations?

Also, can we bump the version number to avoid package problems.