Deployment Pipeline¶
The SubDepthTech Test Deployment Portal features a robust, multi-stage deployment pipeline designed for reliability and speed.
Pipeline Stages¶
1. Build Stage¶
Purpose: Compile and package your application
Actions: - Source code checkout - Dependency installation - Build artifact generation - Asset optimization
Duration: ~2-5 minutes
2. Validation Stage¶
Purpose: Ensure build quality and correctness
Actions: - Lint checks (YAML, Python, JavaScript) - Unit tests - Integration tests - Security scanning (Trivy)
Duration: ~3-7 minutes
3. Deployment Stage¶
Purpose: Deploy to target environment
Actions: - Upload to Cloudflare Pages - DNS propagation - Cache invalidation - Health check verification
Duration: ~1-3 minutes
4. Verification Stage¶
Purpose: Confirm deployment success
Actions: - Smoke tests - Performance checks - Accessibility validation - Visual regression tests
Duration: ~2-4 minutes
Rollback Mechanism¶
Automatic Rollback¶
If any stage fails, the pipeline automatically triggers a rollback:
rollback:
needs: deploy
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Rollback to last successful deployment
run: |
npx wrangler pages rollback --project-name ai-agent-swarm-showcase
Manual Rollback¶
Operators can also trigger manual rollbacks via:
- GitHub Actions UI (workflow_dispatch)
- Cloudflare Dashboard
- Wrangler CLI
- API endpoints
Pipeline Metrics¶
Track your deployment performance:
| Metric | Target | Current Avg |
|---|---|---|
| Build Time | < 5 min | 3.2 min |
| Test Time | < 7 min | 4.8 min |
| Deploy Time | < 3 min | 1.9 min |
| Total Pipeline | < 15 min | 9.9 min |
| Success Rate | > 95% | 97.3% |
Environment Configuration¶
Staging Environment¶
- Branch:
staging-pages - URL:
staging--ai-agent-swarm-showcase.pages.dev - Auto-deploy: Yes
- Rollback: Automatic
Production Environment¶
- Branch:
deploy-pages - URL:
ai-agent-swarm-showcase.pages.dev - Auto-deploy: Yes (after validation)
- Rollback: Automatic + Manual
Best Practices¶
- Always test in staging first: Never push directly to production
- Use feature branches: Isolate changes for testing
- Monitor deployment logs: Watch for warnings and errors
- Validate rollback readiness: Ensure rollback mechanism is functional
- Document changes: Update deployment notes for each release