Sub topic 4
Enabling DevOps Center and creating a project
This chapter covers the first hands-on step: turning on DevOps Center in your org, giving people access, and creating a project that links to a Git repository. Later chapters connect environments in detail, build the pipeline, and create work items.
It assumes you can administer a Salesforce org (sandboxes, permission sets, Setup) and know basic Git terms. You also need a GitHub account, or an account with another Git provider that DevOps Center supports.
The working model
DevOps Center runs inside a Salesforce org, usually your production org. It stores its own records there: projects, pipelines, stages, work items, and the org connections. It does not store your metadata history. That lives in the Git repository, and DevOps Center reads and writes it on your behalf.
Setting up therefore means connecting three things:
- A Salesforce org that hosts the DevOps Center app.
- A Git repository that holds your metadata as source files.
- The people who will use the app, each with the right permissions.
A project is the container that ties one repository to one pipeline and its work items. One org can host several projects, each with its own repository.
Step 1: Prepare the repository
Create the repository before you create the project. Give it a default branch, normally main, so the project has something to track. If the repository is empty, DevOps Center can work from it, but an existing project layout is easier to reason about.
The repository should use the Salesforce DX source format. The root needs an sfdx-project.json that names the source directory:
{
"packageDirectories": [
{ "path": "force-app", "default": true }
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "62.0"
}Add a .forceignore file at the same level. It keeps local tooling files out of deployments, so only real metadata travels through the pipeline:
# .forceignore
**/jsconfig.json
**/.eslintrc.json
**/__tests__/**
.sfdx
.sfIf your org already has years of unmanaged customization, do not try to capture everything at once. Start with the metadata your team changes regularly and grow from there. The chapter on limitations covers metadata types that DevOps Center cannot track.
Step 2: Enable DevOps Center
In Setup, search for DevOps Center and turn it on. Enabling it makes the app and its objects available in the org. Depending on your release, Salesforce may also install a managed package that supplies the app. Follow the on-screen prompts, and check the current Salesforce Help page for the exact prerequisites, because they change between releases.
Two settings catch many first-time setups:
- Change tracking in sandboxes. Development environments need source tracking so DevOps Center can see what a developer changed. Sandboxes created before the feature existed may need it enabled. New Developer and Developer Pro sandboxes usually have it on.
- The org that hosts the app. Install it where release managers can reach it. Switching hosts later means recreating projects, so decide this first.
Step 3: Assign permissions
Enabling the feature does not give anyone access. Salesforce ships permission sets for DevOps Center, and the usual split is between release managers and developers:
| Role | What they do | Typical access |
|---|---|---|
| Release manager | Creates projects, edits pipelines, promotes work items | Release manager permission set |
| Developer | Works on work items, pulls and commits changes | Developer permission set |
| Administrator | Enables the feature, assigns permission sets | System Administrator profile |
Assign the permission sets in Setup under Permission Sets. Permission set names and groupings may differ slightly by release, so open the DevOps Center documentation and match them to what your org lists. The permissions chapter covers governance in depth. For now, give the minimum: only the people who build pipelines should hold the release manager role.
Developers also need a login to each environment they will use, and a Git account with access to the repository.
Step 4: Create the project
Open the App Launcher, search for DevOps Center, and open the app. Choose New Project (the label may read slightly differently in your release). The wizard asks for:
- Project name and description. Use a name that matches the product or team, such as
Sales Cloud Releases. You will see it in every work item. - Source control provider. Pick GitHub or another provider your release lists.
- Authentication. You sign in to the provider and authorize Salesforce to read and write the repository. Use an account that is allowed to push branches and open pull requests.
- Repository. Select the existing repository you prepared in step 1.
After the project is created, DevOps Center prompts you to build the pipeline: which environments exist, and in what order a change passes through them. That is the subject of the next chapters, so you can stop here and confirm the project appears in the app's project list.
Common errors
- The app does not appear in App Launcher. The user has no DevOps Center permission set, or the feature was not fully enabled. Check both before anything else.
- The repository does not appear in the list. The authorized Git account lacks access to it. For GitHub organizations, an owner may also need to approve the application for that organization.
- The wizard succeeds but later commits fail. The authorized account has read access only. Grant write access and reauthorize.
- Changes show up that nobody made. Missing
.forceignoreentries let local files into the repository. Fix the ignore file before the first commit, because cleaning history later is harder. - A sandbox does not report changes. Source tracking was not enabled for it. Refresh or recreate the sandbox if tracking cannot be turned on.
Exercise
A release manager finishes the project wizard, but a developer says DevOps Center is missing from the App Launcher. The developer has a working Salesforce login. What do you check first, and why?
Show answer
Check that the developer has been assigned a DevOps Center permission set. Enabling the feature in Setup does not grant access to anyone, and the app stays hidden without a permission set. If the permission set is present, confirm the feature was fully enabled in the correct org.
Exercise
Your team wants one shared repository for two unrelated products, each with its own release schedule. Based on the model in this chapter, how should you structure DevOps Center, and what is the risk of putting both products into a single project?
Show answer
Create a separate project per product, each with its own repository and pipeline, so the release schedules stay independent. In one project, a single pipeline would force both products' work items through the same stages, and one product's delays or failed validations would block the other.