Sub topic 6
Designing a Pipeline and Its Stages
This chapter assumes you can create a DevOps Center project and connect environments, as covered earlier. It also assumes you know Git branches and Salesforce sandboxes.
What a pipeline is
A pipeline is the ordered path a change follows from development to production. Each step on that path is a stage. A stage links one Salesforce environment to one Git branch. When a work item is promoted into a stage, DevOps Center merges its changes into that stage's branch and deploys them to that stage's org.
The last stage is always production, and it maps to your main branch. Stages before it are usually sandboxes.
Choosing the stages
Start with the fewest stages that give you real checkpoints. Every stage adds a promotion, a deployment, and a place where changes can wait.
| Stage | Typical org | Purpose |
|---|---|---|
| Integration | Developer or Partial Copy sandbox | Combine work items and catch conflicts early |
| UAT | Full or Partial Copy sandbox | Business users test with realistic data |
| Production | Production org | Final release |
Small teams often use Integration and Production only. Larger or regulated teams add a staging stage that mirrors production for final validation.
How stages map to branches
Each stage owns one branch, and the branch holds what that stage's org should contain. You can check what a promotion would carry by comparing branches:
git fetch origin
git log --oneline origin/main..origin/UATThe output lists commits that have reached UAT but not yet main.
Design rules that prevent trouble
- Keep one environment per stage. Two stages sharing an org make the pipeline meaningless.
- Keep stage order stable. Reordering stages later changes which branch work items start from.
- Match sandbox type to purpose. Testing with production-like data needs a copy sandbox, not an empty Developer sandbox.
- Refresh sandboxes on a schedule. A stale UAT org produces test results that do not match production.
- Keep branch names clear and permanent, such as
Integration,UATandmain.
Common errors
- Promotion fails at the first stage. The environment is often not authenticated. Reconnect the org and retry.
- A stage branch is missing. DevOps Center expects the branch to exist in the repository. Create it from main before you add the stage.
- Too many stages. Teams wait for each checkpoint and changes pile up, which raises conflict risk.
Exercise
Your team has a Developer sandbox for integration, a Full sandbox for user testing, and production. Name the stages in order, and say which branch the last stage maps to.
Show answer
Integration, then UAT, then Production. The Production stage maps to the main branch, and each earlier stage maps to its own branch such as Integration and UAT.
Exercise
A colleague pushes a fix directly to the UAT branch in GitHub. Why is this a problem for the pipeline?
Show answer
The UAT org no longer matches the UAT branch, and the change is not tied to a work item. Later promotions can conflict with it or overwrite it.