From db7922c0d6b3fc9785a3ec74bd70a996c82d00c2 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sat, 11 Jul 2026 21:43:28 +0900 Subject: [PATCH] fix: Remove UTF-8 emojis and Korean comments from workflows (Gitea parser compatibility) --- .gitea/workflows/deploy-prod.yml | 86 +++++++++++++++--------------- .gitea/workflows/merge-to-main.yml | 8 +-- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/.gitea/workflows/deploy-prod.yml b/.gitea/workflows/deploy-prod.yml index b3b878e6..892cd8b4 100644 --- a/.gitea/workflows/deploy-prod.yml +++ b/.gitea/workflows/deploy-prod.yml @@ -55,10 +55,10 @@ jobs: - name: "[GATE] Run Core Validations" run: | - echo "πŸ” Running critical CI validations..." + echo " Running critical CI validations..." python3 tools/validate_no_direct_api_trading_v1.py || exit 1 python3 tools/validate_specs.py || exit 1 - echo "βœ… All critical validations passed" + echo " All critical validations passed" - name: Ensure Temp Directory and Mock Packet run: | @@ -95,25 +95,25 @@ jobs: BUILD_TIME=$(date -d "+9 hours" +'%Y-%m-%d %H:%M:%S KST') mkdir -p ./publish/wwwroot printf '{\n "version": "1.0.%s-%s",\n "built": "%s"\n}\n' "${{ github.run_number }}" "$COMMIT_HASH" "$BUILD_TIME" > ./publish/wwwroot/version.json - echo "βœ“ Generated version info: 1.0.${{ github.run_number }}-$COMMIT_HASH @ $BUILD_TIME" + echo " Generated version info: 1.0.${{ github.run_number }}-$COMMIT_HASH @ $BUILD_TIME" - name: Prepare & Validate QuantEngine DB Env run: | - echo "πŸ”§ Preparing database environment..." + echo " Preparing database environment..." DB_PASSWORD="${{ secrets.QUANTENGINE_DB_PASSWORD }}" if [ -z "$DB_PASSWORD" ]; then - echo "❌ QUANTENGINE_DB_PASSWORD secret not configured in Gitea" + echo " QUANTENGINE_DB_PASSWORD secret not configured in Gitea" echo " Please set secret in Repository Settings > Secrets" exit 1 fi if [ -z "${{ env.QUANTENGINE_DB_NAME }}" ] || [ -z "${{ env.QUANTENGINE_DB_USER }}" ]; then - echo "❌ DB configuration environment variables not set" + echo " DB configuration environment variables not set" exit 1 fi - # 배포 폴더에 ν™˜κ²½ μ„€μ • 생성 + # mkdir -p ./deploy printf 'ConnectionStrings__DefaultConnection=Host=127.0.0.1;Database=%s;Username=%s;Password=%s;Search Path=quantengine;\n' \ "${{ env.QUANTENGINE_DB_NAME }}" \ @@ -121,7 +121,7 @@ jobs: "$DB_PASSWORD" > ./deploy/quantengine.env chmod 600 ./deploy/quantengine.env - # appsettings.Production.json 생성 + # appsettings.Production.json mkdir -p ./publish cat < ./publish/appsettings.Production.json { @@ -133,27 +133,27 @@ jobs: chmod 600 ./publish/appsettings.Production.json if [ ! -f ./deploy/quantengine.env ] || [ ! -f ./publish/appsettings.Production.json ]; then - echo "❌ Failed to create database config files" + echo " Failed to create database config files" exit 1 fi - echo "βœ“ Database configuration prepared" + echo " Database configuration prepared" - name: Copy Deployment Scripts run: | - echo "πŸ“‹ Copying deployment scripts..." + echo "π Copying deployment scripts..." 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/deploy_gb.sh ./publish/scripts/validate_migrations.sh - echo "βœ“ Deployment scripts copied" + echo " Deployment scripts copied" - name: Package Artifact run: | - echo "πŸ“¦ Creating deployment package..." + echo " Creating deployment package..." if ! tar -czf quantengine.tar.gz -C ./publish .; then - echo "❌ Failed to create package" + echo " Failed to create package" exit 1 fi @@ -161,45 +161,45 @@ jobs: PACKAGE_BYTES=$(stat -c%s quantengine.tar.gz 2>/dev/null || echo "0") if [ -z "$PACKAGE_BYTES" ] || [ "$PACKAGE_BYTES" -lt 1000000 ]; then - echo "⚠️ Warning: Package seems too small ($PACKAGE_SIZE)" + echo " Warning: Package seems too small ($PACKAGE_SIZE)" fi if [ ! -f quantengine.tar.gz ]; then - echo "❌ Package file not created" + echo " Package file not created" exit 1 fi - echo "βœ“ Package created: $PACKAGE_SIZE" + echo " Package created: $PACKAGE_SIZE" tar -tzf quantengine.tar.gz | head -n 5 || true - name: Pre-Deployment Migration Validation run: | echo "=== Pre-Deployment Database Check ===" - # 배포 νŒ¨ν‚€μ§€ μž„μ‹œ μΆ”μΆœ (κ²€μ¦μš©) + # () TEMP_DEPLOY="/tmp/quantengine_validate" mkdir -p "$TEMP_DEPLOY" tar -xzf quantengine.tar.gz -C "$TEMP_DEPLOY" - # λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ 검증 μ‹€ν–‰ + # chmod +x "$TEMP_DEPLOY/scripts/validate_migrations.sh" "$TEMP_DEPLOY/scripts/validate_migrations.sh" "$TEMP_DEPLOY" - # 정리 + # rm -rf "$TEMP_DEPLOY" - name: Pre-Deployment Verification run: | echo "=== PRE-DEPLOYMENT CHECKS ===" - # 1. SSH ν‚€ 검증 + # 1. SSH if [ ! -f ~/.ssh/id_rsa ]; then echo "ERROR: SSH key not found" exit 1 fi echo "OK: SSH key present" - # 2. 배포 νŒ¨ν‚€μ§€ 검증 + # 2. if [ ! -f quantengine.tar.gz ]; then echo "ERROR: Build artifact (quantengine.tar.gz) not found" exit 1 @@ -210,7 +210,7 @@ jobs: fi echo "OK: Build artifact present (${ARTIFACT_SIZE} bytes)" - # 3. ν•„μˆ˜ 파일 검증 + # 3. for file in deploy/quantengine.env deploy_gb.sh; do if [ ! -f "$file" ]; then echo "ERROR: Required file missing: $file" @@ -219,7 +219,7 @@ jobs: done echo "OK: All required deployment files present" - # 4. ν™˜κ²½ λ³€μˆ˜ 검증 + # 4. if [ -z "${{ secrets.QUANTENGINE_DB_PASSWORD }}" ]; then echo "ERROR: DB password secret not configured" exit 1 @@ -233,7 +233,7 @@ jobs: run: | set -e - # λ³€μˆ˜ μ„€μ • + # TIMESTAMP=$(date +%Y%m%d_%H%M%S) COMMIT=$(git rev-parse --short HEAD) RUN_NUM="${{ github.run_number }}" @@ -269,14 +269,14 @@ jobs: echo "Target: $TARGET_DIR" echo "" - # 배포 디렉토리 생성 + # echo "[1/8] Creating deployment directories..." mkdir -p "${DEPLOY_BASE}" || { echo "FATAL: Cannot create deploy base"; exit 1; } mkdir -p "${TARGET_DIR}" || { echo "FATAL: Cannot create target dir"; exit 1; } echo "OK: Directories created" echo "" - # 배포 νŒ¨ν‚€μ§€ μΆ”μΆœ + # echo "[2/8] Extracting build artifact..." if ! tar -xzf quantengine.tar.gz -C "${TARGET_DIR}"; then echo "FATAL: Failed to extract artifact" @@ -286,7 +286,7 @@ jobs: ls "${TARGET_DIR}" | head -10 echo "" - # 배포 ꡬ쑰 μ •κ·œν™” + # echo "[3/8] Normalizing deployment structure..." if [ -d "${TARGET_DIR}/net10.0" ]; then echo "Found net10.0 subdirectory, moving to root..." @@ -300,7 +300,7 @@ jobs: echo "OK: Structure normalized" echo "" - # ν•„μˆ˜ 파일 검증 + # echo "[4/8] Validating deployment contents..." if [ ! -f "${TARGET_DIR}/QuantEngine.Web.dll" ]; then echo "FATAL: QuantEngine.Web.dll not found in deployment" @@ -313,14 +313,14 @@ jobs: echo "OK: All required files present" echo "" - # ν™˜κ²½ 파일 μ„€μΉ˜ + # echo "[5/8] Installing environment configuration..." mkdir -p /home/kjh2064/.config || { echo "WARNING: Cannot create config dir"; } install -m 600 ./deploy/quantengine.env /home/kjh2064/.config/quantengine.env || { echo "WARNING: Config file install failed"; } echo "OK: Configuration installed" echo "" - # appsettings.Production.json 생성 + # appsettings.Production.json echo "[6/8] Creating production appsettings..." mkdir -p "${TARGET_DIR}" DB_PASSWORD="${{ secrets.QUANTENGINE_DB_PASSWORD }}" @@ -352,7 +352,7 @@ EOF echo "commit=${COMMIT}" >> $GITHUB_OUTPUT echo "target_dir=${TARGET_DIR}" >> $GITHUB_OUTPUT - # 이전 버전 μ €μž₯ (둀백용) + # () PREV_VERSION="none" if [ -L "${ACTIVE_LINK}" ]; then PREV_VERSION=$(readlink -f "${ACTIVE_LINK}") @@ -373,7 +373,7 @@ EOF echo "OK: Green-Blue deployment completed" - # 배포 정보 μ €μž₯ + # cat > "${TARGET_DIR}/.deployment_info" << EOF Deployed: $(date -u +'%Y-%m-%dT%H:%M:%SZ') Commit: ${COMMIT} @@ -413,7 +413,7 @@ EOF echo "=== POST-DEPLOYMENT HEALTH CHECKS ===" - # 1. 배포 디렉토리 검증 + # 1. echo "[1/4] Verifying deployment directory..." if [ ! -d "$TARGET_DIR" ]; then echo "FATAL: Deployment directory not found: $TARGET_DIR" @@ -425,7 +425,7 @@ EOF fi echo "OK: Deployment directory verified" - # 2. Loopback ν—¬μŠ€ 체크 + # 2. Loopback echo "[2/4] Performing loopback health checks..." health_check_passed=0 for i in $(seq 1 ${{ env.HEALTH_CHECK_RETRIES }}); do @@ -447,7 +447,7 @@ EOF fi echo "OK: Loopback health check passed" - # 3. λ°μ΄ν„°λ² μ΄μŠ€ μ—°κ²° 검증 + # 3. echo "[3/4] Verifying database connectivity..." if timeout 10 bash -c 'cat /home/kjh2064/.config/quantengine.env | grep -q "postgresql"' 2>/dev/null; then echo "OK: Database credentials configured" @@ -455,7 +455,7 @@ EOF echo "WARNING: Could not verify database credentials" fi - # 4. μ„œλΉ„μŠ€ μƒνƒœ 확인 + # 4. echo "[4/4] Checking service status..." if systemctl is-active --quiet quantengine; then echo "OK: Service is running" @@ -516,9 +516,9 @@ EOF db_status=$(psql -U quantengine_app -d quantenginedb -h 127.0.0.1 -c 'SELECT 1;' 2>&1 | head -1) if echo "$db_status" | grep -q "1"; then - echo "βœ“ Database connectivity verified" + echo " Database connectivity verified" else - echo "⚠️ Database connectivity check: $db_status" + echo " Database connectivity check: $db_status" fi - name: Post-Deployment Verification @@ -526,7 +526,7 @@ EOF run: | echo "=== POST-DEPLOYMENT VERIFICATION ===" - # Public endpoints 검증 + # Public endpoints echo "[1/3] Verifying public endpoints..." for endpoint in "/" "/Account/Login"; do code=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 5 "https://quant.taxbaik.com${endpoint}") @@ -536,7 +536,7 @@ EOF fi done - # Nginx μ„€μ • 검증 + # Nginx echo "[2/3] Verifying Nginx configuration..." if nginx -t 2>&1 | grep -q "successful"; then echo " OK: Nginx syntax valid" @@ -544,7 +544,7 @@ EOF echo " WARNING: Nginx validation may have issues" fi - # 배포 기둝 생성 + # echo "[3/3] Creating deployment record..." DEPLOYMENT_SUMMARY="deployment_summary_${{ steps.deploy.outputs.timestamp }}.txt" cat > "$DEPLOYMENT_SUMMARY" << EOF @@ -640,5 +640,5 @@ Logs: https://gitea.taxbaik.com/kjh2064/QuantEngineByItz/actions/runs/${{ github curl -fsS -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d "chat_id=${TELEGRAM_CHAT_ID}" \ - --data-urlencode "text=❌ QuantEngine 배포 μ‹€νŒ¨\n컀밋: ${COMMIT}\n둜그: https://gitea.taxbaik.com/kjh2064/QuantEngineByItz/actions/runs/${{ github.run_id }}" \ + --data-urlencode "text= QuantEngine \n: ${COMMIT}\n: https://gitea.taxbaik.com/kjh2064/QuantEngineByItz/actions/runs/${{ github.run_id }}" \ -d "parse_mode=HTML" || true diff --git a/.gitea/workflows/merge-to-main.yml b/.gitea/workflows/merge-to-main.yml index 6d4e02b3..f3c8712b 100644 --- a/.gitea/workflows/merge-to-main.yml +++ b/.gitea/workflows/merge-to-main.yml @@ -46,7 +46,7 @@ jobs: - name: Report Tier 1 if: success() - run: echo "βœ“ Tier 1 (Fast Gates) passed" + run: echo " Tier 1 (Fast Gates) passed" stage-2-critical-gates: name: "Stage 2: Critical Gates" @@ -75,7 +75,7 @@ jobs: - name: Report Tier 2 if: success() - run: echo "βœ“ Tier 2 (Critical Gates) passed" + run: echo " Tier 2 (Critical Gates) passed" stage-3-validators-parallel: name: "Stage 3: Integration Tests" @@ -99,7 +99,7 @@ jobs: - name: Report Tier 3 if: always() - run: echo "βœ“ Tier 3 (Integration Tests) completed" + run: echo " Tier 3 (Integration Tests) completed" stage-4-build: name: "Stage 4: Build and Package" @@ -162,7 +162,7 @@ jobs: - name: Report Tier 4 if: success() - run: echo "βœ“ Tier 4 (Build) succeeded" + run: echo " Tier 4 (Build) succeeded" stage-5-deploy: name: "Stage 5: Trigger Deploy Pipeline"