Enterprise gated workflow with manual approvals at each stage.
This example demonstrates:
- ✅ 5-stage gated flow - develop → alpha → beta → release → production
- ✅ Manual approvals - No auto-merge, all promotions via PR approval
- ✅ Merge commits - Creates merge commits (not fast-forward) for audit trail
- ✅ Custom branch names - alpha, beta, release instead of staging
- ✅ Enterprise workflow - Real-world approval process
- ✅ Production-ready - Starts at v1.0.0
- ✅ 4 domains - services, web, api, shared
{
"branchFlow": ["develop", "alpha", "beta", "release", "production"],
"mergeStrategy": "merge",
"autoMerge": {
"alpha": false,
"beta": false,
"release": false,
"production": false
},
"domains": {
"services": { "paths": ["services/**"] },
"web": { "paths": ["web/**"] },
"api": { "paths": ["api/**"] },
"shared": { "paths": ["shared/**"] }
}
}git checkout develop
git commit -m "feat: add new feature"
git push origin developPipeCraft:
- Runs tests
- Calculates version
- Creates PR to alpha (awaits approval)
Manual Action Required:
- Review PR from develop → alpha
- Approve and merge PR
PipeCraft:
- Runs tests on alpha
- Creates PR to beta (awaits approval)
Manual Action Required:
- QA team reviews PR from alpha → beta
- Runs acceptance tests
- Approves and merges PR
PipeCraft:
- Runs tests on beta
- Creates PR to release (awaits approval)
Manual Action Required:
- Stakeholders review PR from beta → release
- Final approval for production readiness
- Approves and merges PR
PipeCraft:
- Runs final tests
- Creates PR to production (awaits approval)
Manual Action Required:
- DevOps/Release Manager reviews PR
- Schedules deployment window
- Approves and merges PR
PipeCraft:
- Creates version tag (e.g., v1.2.0)
- Triggers deployment
develop ──PR──► alpha ──PR──► beta ──PR──► release ──PR──► production
│ │ │ │ │
│ tests pass │ QA review │ acceptance │ final review │ tagged
└──────────────►└────────────►└────────────►└──────────────►v1.2.0
(creates PR) (manual) (manual) (manual)
| Feature | Minimal | Basic | Nx | Gated |
|---|---|---|---|---|
| Branches | 2 | 3 | 3 | 5 |
| Auto-merge | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No |
| Merge Strategy | fast-forward | fast-forward | fast-forward | merge |
| Approval Gates | None | None | None | All stages |
| Use Case | Quickstart | Standard | Complex | Enterprise |
Use when you need:
- Human approval before production
- QA sign-off at specific stages
- Stakeholder review before release
- Audit trail with merge commits
- Scheduled deployment windows
- Compliance requirements
Don't use if:
- You want fast iteration
- Team is small (<5 people)
- CI/CD should be fully automated
- You practice continuous deployment
# Clone
git clone https://github.com/the-craftlab/pipecraft-example-gated.git
cd pipecraft-example-gated
# Test locally
npm test
npm run build
# Make a change
echo "export const newFeature = () => {};" >> services/auth-service.js
git add .
git commit -m "feat: add new authentication feature"
git push origin develop
# Watch for PR creation
gh pr list- Push to
develop - Wait for tests to pass
- PR to
alphais created automatically - Notify QA team
- Review PRs targeting
beta - Run manual acceptance tests
- Approve if tests pass
- Merge PR
- Review PRs targeting
production - Verify all gates passed
- Schedule deployment
- Approve and merge
- Monitor deployment
Check workflow logs:
gh run view --log | grep "create-pr"Verify autoMerge is false in config.
Run locally first:
npm test
npm run buildResolve in PR:
git checkout alpha
git merge develop
# Resolve conflicts
git push origin alphaMIT © PipeCraft Team