diff --git a/clusters/cl01tl/platform/gitea/values.yaml b/clusters/cl01tl/platform/gitea/values.yaml index f09843389..a03eea008 100644 --- a/clusters/cl01tl/platform/gitea/values.yaml +++ b/clusters/cl01tl/platform/gitea/values.yaml @@ -279,10 +279,14 @@ backup: export WEEK_AGO=$(date -d @$(( $(date +%s) - 604800 )) +%Y-%m-%d\ %H:%M:%S); echo ">> Running S3 prune for Gitea backup repository" echo ">> Backups prior to '$WEEK_AGO' will be removed" + echo ">> File list:" + s3cmd ls -v $S3_REPOSITORY + echo ">> Deleting ..." s3cmd ls -v $S3_REPOSITORY | awk -v week_ago="$WEEK_AGO" '$1 < week_ago {print $4}' | while read file; do s3cmd del -v "$file"; + echo ">> Deleted $file"; done; echo ">> Completed S3 prune for Gitea backup repository" envFrom: