Skip to content

Overview

Setup Guide

This guide takes you from an empty Git repository to a working CI/CD pipeline, with a first Pull Request validated and deployed. Count one to three days for a first setup, depending on your Git platform and the state of your production org.

Learn by doing

Level 3 - Release Manager of the free Salesforce DevOps with sfdx-hardis course walks through this guide on a free org of your own: 11 labs, about 6 h 55. Start Level 3

CI/CD branch and org schema


Prerequisites

  • Basic knowledge of Git and Salesforce DX. If you are new to them, these resources are a good start: Learn Git Branching and the Salesforce DX Trailmix.
  • The tools installed on your computer: VS Code, the SFDX Hardis extension and its dependencies.
  • An account on a Git platform (GitHub, GitLab, Azure DevOps, Bitbucket or Gitea) with CI runner minutes, or a Jenkins server.
  • Administrator access to the Salesforce production org.

Setup steps

  1. Create the Git repository: create the repository and the major branches (main, preprod, uat, integration...), protect them and define the merge rules.
  2. Prepare the Salesforce orgs: activate Dev Hub and source tracking, create one sandbox per major branch.
  3. Initialize the SFDX project: generate the project structure and the CI/CD workflow files with sf hardis:project:create.
  4. Configure CI authentication: let the CI server connect to each major org with an External Client App and a JWT certificate.
  5. Retrieve an existing org (optional): bring the metadata of an existing production org into the repository, then clean it.
  6. Set up a scratch org pool (optional): for scratch org projects, keep scratch orgs ready in your git provider, so jobs and developers get one in seconds.
  7. Create the first Pull Request: merge the setup branch and get the validation jobs green.

Then:


Need help?

Let the people who build sfdx-hardis set up your pipeline

Cloudity writes sfdx-hardis. Its experts can set up your pipeline end to end, ready to go live, or ride along while your team follows this guide.

Prefer to do it on your own? Ask the community in GitHub issues.

Learn by doing

The free Salesforce DevOps with sfdx-hardis course does this, click by click, on an org of your own:

Comments