summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xacid/acid1
-rw-r--r--acid/config.sh3
2 files changed, 4 insertions, 0 deletions
diff --git a/acid/acid b/acid/acid
index c675fa1..49e8e72 100755
--- a/acid/acid
+++ b/acid/acid
@@ -92,6 +92,7 @@ sleep "$CYCHE_STARTUP_TIME"
remove
update --force
docker system prune --force --all
+find /logs -type f | sort -n | head -n "$((CYCHE_LOG_SIZE*-1))" | xargs rm -f
starttime=$(now)
# monitor source changes
diff --git a/acid/config.sh b/acid/config.sh
index ff44998..a25531e 100644
--- a/acid/config.sh
+++ b/acid/config.sh
@@ -10,6 +10,9 @@ CYCHE_JOB_TIME=10 # 10 seconds
# Minimum time to wait on daemon startup
CYCHE_STARTUP_TIME=60 # 1 minute
+# Maximum number of latest build logs to retain during cleanup
+CYCHE_LOG_SIZE=100
+
# Master list of managed services
CYCHE_SERVICES=(
# <ref-pattern> should be a string suitable for `git for-each-ref`. Some