Publish EUnit/CT HTML reports to ci-reports host.
Refs EventHub/EventHubBack#62
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user