Deploy Pipeline
How to orchestrate deployments with CodeSpar, including single-project deploys, approval flows, cross-channel approval, cascading deploys, and rollback procedures.
Deploy Pipeline
CodeSpar orchestrates deployments through its Deploy Agent, with built-in approval flows, cross-channel support, and rollback capabilities. Production deploys always require human approval, regardless of autonomy level.
Single Project Deploy
Deploy to Staging
Behavior by autonomy level:
| Level | Behavior |
|---|---|
| L0–L4 | Approval required before deploy starts |
| L5 | Auto-deploys to staging (no approval needed) |
Example flow:
Deploy to Production
Production deploys always require approval, even at L5:
Approval Flow
Standard Approval
After deployment completes:
Self-Approval Blocking
The person who requested the deploy cannot approve it:
Approval Without Token
Approve the most recent pending action (when there is only one):
Expired Approvals
Approval tokens expire after 30 minutes:
Cross-Channel Approval
One of CodeSpar's key features is cross-channel approval: an action requested in one channel can be approved from another.
Example: Slack to WhatsApp
Both channels receive the deployment status updates.
Requirements for Cross-Channel Approval
- The approver must have a linked identity across channels
- The approver must have sufficient RBAC permissions (operator role or higher)
- The approval token must not be expired
Cascading Deploys
The Coordinator Agent can orchestrate multi-project deployments in sequence.
Syntax
This tells the Coordinator to:
- Deploy the
gw(gateway) project to staging - Wait for health check to pass
- Deploy the
front(frontend) project to staging - Report overall status
Example Flow
After approval:
After completion:
Cascading Deploy Failure
If any step fails, the cascade stops and reports the failure:
Rollback
Rollback the last deployment to a previous version.
Rollback is a critical-risk action and always requires approval:
After approval:
Production Rollback
Same flow, but with additional safety messaging:
Deploy Status
Check the status of a recent deploy:
Audit Trail
All deploy-related actions are logged in the audit trail:
Example entries:
RBAC Permissions
| Role | Can Deploy | Can Rollback | Can Approve |
|---|---|---|---|
owner | Yes | Yes | Yes |
maintainer | Yes | Yes | Yes |
operator | Yes | No | Yes |
reviewer | No | No | No |
read-only | No | No | No |
emergency_admin | Yes | Yes | Yes |
Troubleshooting
Deploy hangs at "waiting for approval"
- Check that the approval token has not expired (30 minutes)
- Verify the approver has sufficient RBAC permissions
- Remember: self-approval is blocked by default
Deploy fails after approval
- Check CodeSpar logs for deployment errors
- Verify the CI/CD pipeline configuration
- Check the target environment is reachable
- Try rollback:
@codespar rollback staging
Cascading deploy only deploys first service
- Verify both project names are correct and linked
- Check that the Coordinator Agent is active:
@codespar status agent - Check logs for errors:
@codespar logs 20
Next Steps
- Graduated Autonomy — Configure auto-deploy levels
- Security — RBAC and approval configuration
- Multi-Channel Setup — Cross-channel approvals