mirror of
https://github.com/ghndrx/k8s-game-2048.git
synced 2026-02-10 06:45:07 +00:00
feat: Complete PII cleanup and fully automatic pipeline
🧹 PII Cleanup & Security: - Remove all hardcoded domains (darknex.us, hndrx.co) - Remove all hardcoded emails (admin@ references) - Replace all personal info with environment variables - Repository now 100% generic and reusable 🚀 Fully Automatic Pipeline: - Pipeline now runs automatically develop → staging → production - No manual intervention required for production promotions - Auto-promotion triggers after successful tests - All workflows use commit-specific image tags 🔧 Environment Variables: - All manifests use ${VARIABLE_NAME} syntax - All scripts source from .env file - GitHub Actions use secrets for sensitive data - Complete .env.example template provided 📚 Documentation: - New comprehensive WORKFLOWS.md with pipeline details - New PIPELINE_QUICK_REFERENCE.md for quick reference - Updated all docs to use generic placeholders - Added security/privacy section to README 🔐 Security Enhancements: - Updated .gitignore for all sensitive files - Created PII verification script (verify-pii-removal.sh) - Created cleanup automation script (cleanup-pii.sh) - Repository verified PII-free and production-ready BREAKING: Repository now requires .env configuration - Copy .env.example to .env and configure for your environment - Set GitHub repository secrets for CI/CD workflows - All deployments now use environment-specific configuration
This commit is contained in:
27
.github/workflows/promote-to-production.yml
vendored
27
.github/workflows/promote-to-production.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Promote to Production
|
||||
name: Auto-Promote to Production
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
@@ -8,11 +8,8 @@ on:
|
||||
branches: [ staging ]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
confirmation:
|
||||
description: 'Type "PROMOTE" to confirm staging → production promotion'
|
||||
required: true
|
||||
skip_tests:
|
||||
description: 'Skip staging tests (use only if staging is already validated)'
|
||||
description: 'Emergency override: Skip staging tests (use only if staging is already validated)'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
@@ -23,7 +20,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
environment: staging
|
||||
if: |
|
||||
(github.event_name == 'workflow_dispatch' && github.event.inputs.confirmation == 'PROMOTE') ||
|
||||
(github.event_name == 'workflow_dispatch') ||
|
||||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
|
||||
|
||||
steps:
|
||||
@@ -43,12 +40,18 @@ jobs:
|
||||
run: |
|
||||
echo "✅ Staging smoke tests passed - proceeding with auto-promotion to production"
|
||||
|
||||
- name: Auto-promotion to production
|
||||
if: github.event_name == 'workflow_run'
|
||||
run: |
|
||||
echo "<22> Staging smoke tests passed - automatically promoting to production"
|
||||
echo "📋 Trigger: Automatic after staging tests"
|
||||
echo "✅ No manual intervention required"
|
||||
|
||||
- name: Manual promotion confirmation
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
run: |
|
||||
echo "🔒 Manual promotion to production confirmed"
|
||||
echo "🔧 Manual promotion to production triggered"
|
||||
echo "📋 Trigger: ${{ github.event_name }}"
|
||||
echo "🎯 Confirmation: ${{ github.event.inputs.confirmation }}"
|
||||
echo "⚡ Skip tests: ${{ github.event.inputs.skip_tests }}"
|
||||
|
||||
- name: Auto-promote staging to main branch
|
||||
@@ -56,7 +59,7 @@ jobs:
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
console.log('🎯 All staging smoke tests passed! Auto-promoting staging to main branch...');
|
||||
console.log('🚀 All staging smoke tests passed! Auto-promoting staging to main for production deployment...');
|
||||
|
||||
// Create a merge from staging to main
|
||||
try {
|
||||
@@ -99,9 +102,9 @@ jobs:
|
||||
echo "### 🎮 Deployment Status" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
# Use canonical domain format (these are the Knative domains)
|
||||
DEV_URL="https://game-2048-dev.game-2048-dev.dev.wa.darknex.us"
|
||||
STAGING_URL="https://game-2048-staging.game-2048-staging.staging.wa.darknex.us"
|
||||
PROD_URL="https://game-2048-prod.game-2048-prod.wa.darknex.us"
|
||||
DEV_URL="https://${{ secrets.DEV_DOMAIN }}"
|
||||
STAGING_URL="https://${{ secrets.STAGING_DOMAIN }}"
|
||||
PROD_URL="https://${{ secrets.PROD_DOMAIN }}"
|
||||
|
||||
echo "- **Development**: ✅ Live at $DEV_URL" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- **Staging**: ✅ Live at $STAGING_URL" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
Reference in New Issue
Block a user