chore(ci): preflight migration validation before deploy
TaxBaik CI/CD / build-and-deploy (push) Failing after 3m47s

This commit is contained in:
2026-07-02 14:12:23 +09:00
parent f68c968aed
commit 3f486d9fe9
3 changed files with 74 additions and 552 deletions
+12 -1
View File
@@ -78,6 +78,9 @@ jobs:
- name: Copy migrations
run: mkdir -p ./publish/db && cp -r db/migrations ./publish/db/ || true
- name: Validate migration version uniqueness
run: bash scripts/validate_migrations.sh db/migrations
- name: Generate build info
run: |
COMMIT_HASH=$(git rev-parse --short HEAD)
@@ -109,6 +112,9 @@ jobs:
- name: Package artifact
run: |
cp deploy_gb.sh ./publish/deploy_gb.sh
mkdir -p ./publish/scripts
cp scripts/validate_migrations.sh ./publish/scripts/validate_migrations.sh
chmod +x ./publish/scripts/validate_migrations.sh
tar -czf taxbaik_deploy.tgz -C ./publish .
echo "✓ Package: $(du -sh taxbaik_deploy.tgz | cut -f1)"
@@ -175,7 +181,12 @@ jobs:
test -s "\$DEPLOY_DIR/proxy/TaxBaik.Proxy.dll" \
|| { echo "FATAL: TaxBaik.Proxy.dll 없음" >&2; exit 1; }
echo "--- [3/4] Green-Blue 배포 실행 ---"
echo "--- [3/5] 마이그레이션 사전 검증 ---"
test -x "\$DEPLOY_DIR/scripts/validate_migrations.sh" \
|| { echo "FATAL: validate_migrations.sh 없음" >&2; exit 1; }
"\$DEPLOY_DIR/scripts/validate_migrations.sh" "\$DEPLOY_DIR/db/migrations" "postgresql://taxbaik:taxbaik123@localhost:5432/taxbaikdb"
echo "--- [4/5] Green-Blue 배포 실행 ---"
chmod +x "\$DEPLOY_DIR/deploy_gb.sh"
"\$DEPLOY_DIR/deploy_gb.sh" "\$DEPLOY_DIR"