chore: Deployment version naming and cleanup policy
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 14s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
Build & Package / build (push) Failing after 1m28s
Deploy to Production (Local) / Build & Deploy to Production (push) Failing after 1m26s

- **Version naming**: Include date, time, commit hash, and CI run number
  Format: quantengine_YYYYMMDD_HHMMSS_COMMIT_HASH_RUNNUM
- **Cleanup script**: Auto-remove old versions to prevent disk exhaustion
  - Keep 5 most recent by default
  - Remove staging/test versions
  - Can be run weekly via cron or after deployments
  - Supports dry-run mode for validation

Addresses: Disk usage management for long-running CI/CD pipeline

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 18:56:12 +09:00
parent 363691e612
commit f1337d9b5b
2 changed files with 95 additions and 1 deletions
+3 -1
View File
@@ -182,9 +182,11 @@ jobs:
set -e
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
COMMIT=$(git rev-parse --short HEAD)
RUN_NUM="${{ github.run_number }}"
DEPLOY_BASE="/home/kjh2064/deployments"
ACTIVE_LINK="/home/kjh2064/quantengine_active"
TARGET_DIR="${DEPLOY_BASE}/quantengine_${TIMESTAMP}"
# Version format: quantengine_YYYYMMDD_HHMMSS_COMMIT_HASH_RUNNUM
TARGET_DIR="${DEPLOY_BASE}/quantengine_${TIMESTAMP}_${COMMIT}_${RUN_NUM}"
TELEGRAM_BOT_TOKEN="${{ secrets.TELEGRAM_BOT_TOKEN }}"
[ -z "$TELEGRAM_BOT_TOKEN" ] && TELEGRAM_BOT_TOKEN="${{ env.TELEGRAM_BOT_TOKEN_DEFAULT }}"