Sub topic 3
What DevOps Center is and how it is built
This chapter assumes you know Salesforce sandboxes and metadata, basic Git (branches, commits, pull requests, merges), and have used change sets. It explains the parts of DevOps Center and how they connect. Later chapters cover setup and daily use.
What DevOps Center does
DevOps Center is a Salesforce application for moving changes from development sandboxes to production. It replaces the manual change set process with a source-driven one. A Git repository holds the metadata, and each change travels through the repository and a series of orgs.
Change sets copy metadata directly between orgs and leave no shared history. DevOps Center records each change as Git commits, so you get history, review and repeatable promotion. It does this without asking admins to type Git commands.
The main building blocks
| Part | What it is |
|---|---|
| Project | The top-level container for one release effort. It links one repository and one pipeline. |
| Pipeline | The ordered path a change follows to production. |
| Stage | One step in the pipeline. Each stage has an environment and a branch. |
| Environment | A Salesforce org connected to DevOps Center, such as a sandbox or production. |
| Work item | One unit of change, such as a user story. Each work item gets its own branch. |
Think of it this way: a project owns a pipeline, a pipeline is made of stages, and each stage maps to one environment and one branch. Work items move through those stages.
How it is built
DevOps Center is a managed package that you install into a Salesforce org, which acts as the control org. The package adds the DevOps Center app and its objects, which store projects, pipelines and work items. You can choose any org that has the feature enabled, and it does not have to be production.
The app does not store your metadata. It connects to two outside systems:
- The Git repository. The repository is the source of truth. DevOps Center creates a branch per work item and one branch per pipeline stage, and it merges them through pull requests. GitHub is the main supported provider, and the Git host does the real version control.
- The environments. DevOps Center authenticates to each org, then retrieves metadata from it or deploys metadata to it as a stage requires.
The repository must use the Salesforce DX project layout, with an sfdx-project.json file at the root:
{
"packageDirectories": [
{ "path": "force-app", "default": true }
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "62.0"
}The path value names the folder that Git tracks. DevOps Center only reads and writes metadata under this directory.
How one change flows
- You create a work item, and DevOps Center creates its branch.
- You change metadata in a development sandbox, and DevOps Center detects the changes.
- You commit the changes to the work item branch.
- A pull request merges the branch into the first stage's branch, and DevOps Center deploys it to that stage's environment.
- You promote the work item stage by stage until it reaches production.
Common mistakes
- Treating the control org as a deployment target. It only runs the app.
- Editing a stage's environment directly. This makes the org drift away from its branch.
- Putting metadata outside the package directory, so it never reaches the repository.
Exercise
A teammate says DevOps Center stores your metadata in the Salesforce org where it is installed. What is wrong with that statement, and where does the metadata live?
Show answer
The control org only stores DevOps Center's own records, such as projects, pipelines and work items. The metadata lives in the Git repository, under the package directory defined in sfdx-project.json, and in the connected environments.