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.

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. Create the first Pull Request: merge the setup branch and get the validation jobs green.

Then:


Need help?

Cloudity, the company behind sfdx-hardis, offers an assisted setup and a full setup service. Community support is available through GitHub issues.

Comments