Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't prune most recent images #7337

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/scripts/periodic-cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eo pipefail

PRUNE_THRESHOLD=70
PRUNE_THRESHOLD=60
FULL_PRUNE_THRESHOLD=50

function disk_usage_above_threshold() {
Expand All @@ -14,9 +14,9 @@ function disk_usage_above_threshold() {

if disk_usage_above_threshold $PRUNE_THRESHOLD; then
echo "Exceeded threshold %$PRUNE_THRESHOLD, running docker system prune..."
docker system prune -f
docker system prune -f --filter "until=20m"
if disk_usage_above_threshold $FULL_PRUNE_THRESHOLD; then
echo "Still exceeded threshold %$FULL_PRUNE_THRESHOLD, running docker system prune -a..."
docker system prune -af
docker system prune -af --filter "until=20m"
fi
fi