Prune admin-ui-dist artifacts; drop Playwright report zips.

Refs EventHub/EventHubFrontAdmin#42
This commit is contained in:
2026-07-27 22:49:42 +03:00
parent 68a57a33c2
commit 6a4734ba1c
5 changed files with 198 additions and 25 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Удаляет каталоги отчётов старше CI_REPORTS_KEEP_DAYS (default 14).
# Usage: prune-ci-reports.sh [/var/eventhub/ci-reports]
set -euo pipefail
ROOT="${1:-${CI_REPORTS_DIR:-/var/eventhub/ci-reports}}"
KEEP_DAYS="${CI_REPORTS_KEEP_DAYS:-14}"
if [[ ! -d "${ROOT}" ]]; then
echo "ci-reports: ${ROOT} отсутствует — пропуск"
exit 0
fi
echo "ci-reports prune: root=${ROOT} keep_days=${KEEP_DAYS}"
find "${ROOT}" -mindepth 2 -maxdepth 2 -type d -mtime "+${KEEP_DAYS}" -print -exec rm -rf {} + 2>/dev/null || true
echo "ci-reports prune: done"