From ad2ea6e4e92ccbab4f6e1383a97e867a39c09669 Mon Sep 17 00:00:00 2001 From: Daniel Phelps Date: Thu, 4 Jan 2024 15:04:14 -0800 Subject: [PATCH] Don't full prune prematurely --- .circleci/scripts/periodic-cleanup | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/scripts/periodic-cleanup b/.circleci/scripts/periodic-cleanup index a83c99646dc..9feb61c7d4e 100644 --- a/.circleci/scripts/periodic-cleanup +++ b/.circleci/scripts/periodic-cleanup @@ -15,9 +15,9 @@ function disk_usage_above_threshold() { if disk_usage_above_threshold $PRUNE_THRESHOLD; then echo "Cleaning up docker..." docker system prune -f + if disk_usage_above_threshold $FULL_PRUNE_THRESHOLD; then + echo "Disk usage exceeds full prune threshold, perfoming full cleanup..." + docker system prune -af + fi fi -if disk_usage_above_threshold $FULL_PRUNE_THRESHOLD && [[ $1 = "--full" ]]; then - echo "Disk usage exceeds full prune threshold, perfoming full cleanup..." - docker system prune -af -fi