161ef94b4f
Check engine pin consistency / Dockerfile / CI pin consistency (push) Successful in 8s
Sirius CI/CD Pipeline / Detect Changes (push) Successful in 23s
Validate Docker Configuration / Validate Docker Compose Configuration (push) Successful in 47s
Sirius CI/CD Pipeline / Build API (${{ matrix.platform }}) (push) Has been cancelled
Sirius CI/CD Pipeline / Build UI (${{ matrix.platform }}) (push) Has been cancelled
Sirius CI/CD Pipeline / Merge Engine Manifest (push) Has been cancelled
Sirius CI/CD Pipeline / Merge API Manifest (push) Has been cancelled
Sirius CI/CD Pipeline / Merge UI Manifest (push) Has been cancelled
Sirius CI/CD Pipeline / Build Engine (${{ matrix.platform }}) (push) Has been cancelled
Sirius CI/CD Pipeline / Build Infra (${{ matrix.service }}, ${{ matrix.platform }}) (push) Has been cancelled
Sirius CI/CD Pipeline / Merge Infra Manifest (sirius-postgres) (push) Has been cancelled
Sirius CI/CD Pipeline / Merge Infra Manifest (sirius-rabbitmq) (push) Has been cancelled
Sirius CI/CD Pipeline / Merge Infra Manifest (sirius-valkey) (push) Has been cancelled
Sirius CI/CD Pipeline / Integration Test (push) Has been cancelled
Sirius CI/CD Pipeline / Public Stack Contract (push) Has been cancelled
Sirius CI/CD Pipeline / Dispatch Demo Deployment (sirius-demo branch) (push) Has been cancelled
Sirius CI/CD Pipeline / Dispatch Demo Canary (main branch) (push) Has been cancelled
Sirius CI/CD Pipeline / Guard Registry Namespace (push) Has been cancelled
94 lines
3.6 KiB
YAML
94 lines
3.6 KiB
YAML
name: Validate Docker Configuration
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "docker-compose*.yaml"
|
|
- ".github/workflows/validate-docker-config.yml"
|
|
push:
|
|
branches: [main, develop]
|
|
paths:
|
|
- "docker-compose*.yaml"
|
|
- ".github/workflows/validate-docker-config.yml"
|
|
|
|
jobs:
|
|
validate-docker-config:
|
|
name: Validate Docker Compose Configuration
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Validate docker-compose.override.yaml
|
|
run: |
|
|
echo "🔍 Validating docker-compose.override.yaml configuration..."
|
|
|
|
# Check if volume mounts in sirius-engine are commented out
|
|
if grep -E "^\s*-\s+\.\./minor-projects/" docker-compose.override.yaml; then
|
|
echo "❌ FAIL: Volume mounts are uncommented in docker-compose.override.yaml"
|
|
echo "Found uncommented volume mounts:"
|
|
grep -E "^\s*-\s+\.\./minor-projects/" docker-compose.override.yaml
|
|
echo ""
|
|
echo "💡 These should be commented out with '#' to prevent accidental commits"
|
|
echo "💡 Use docker-compose.local.yaml for local development overrides"
|
|
exit 1
|
|
fi
|
|
|
|
# Check that the commented examples exist
|
|
if ! grep -E "^\s*#\s*-\s+\.\./minor-projects/" docker-compose.override.yaml; then
|
|
echo "⚠️ WARNING: No commented volume mount examples found"
|
|
echo "💡 Consider adding commented examples for developer reference"
|
|
fi
|
|
|
|
echo "✅ docker-compose.override.yaml validation passed"
|
|
|
|
- name: Validate no local files committed
|
|
run: |
|
|
echo "🔍 Checking for accidentally committed local files..."
|
|
|
|
# Check if any local override files were committed
|
|
if [ -f "docker-compose.local.yaml" ]; then
|
|
echo "❌ FAIL: docker-compose.local.yaml should not be committed"
|
|
echo "💡 This file is for local development only and should be git-ignored"
|
|
exit 1
|
|
fi
|
|
|
|
# Check for any other local override patterns
|
|
if ls docker-compose.*.local.yaml 2>/dev/null; then
|
|
echo "❌ FAIL: Local docker-compose files found:"
|
|
ls docker-compose.*.local.yaml
|
|
echo "💡 These files should be git-ignored"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ No local override files found in repository"
|
|
|
|
- name: Validate no outdated template files
|
|
run: |
|
|
echo "🔍 Checking for outdated template files..."
|
|
|
|
# Check for old template files that should not exist
|
|
if [ -f "docker-compose.local.example.yaml" ]; then
|
|
echo "❌ FAIL: docker-compose.local.example.yaml is an outdated template"
|
|
echo "💡 This file is from an old implementation and should be removed"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ No outdated template files found"
|
|
|
|
- name: Summary
|
|
if: success()
|
|
run: |
|
|
echo "🎉 All Docker configuration validations passed!"
|
|
echo ""
|
|
echo "📋 What was validated:"
|
|
echo " ✅ Volume mounts are properly commented in docker-compose.override.yaml"
|
|
echo " ✅ No local override files accidentally committed"
|
|
echo " ✅ No outdated template files found"
|
|
echo ""
|
|
echo "💡 For local development, developers should:"
|
|
echo " 1. Run './scripts/dev-setup.sh init' to create local overrides"
|
|
echo " 2. Edit docker-compose.local.yaml (git-ignored) for their needs"
|
|
echo " 3. Use './scripts/dev-setup.sh start-extended' for extended development"
|