Init SFDX Project

  • Create a new git branch named cicd under your lower major branch (usually integration)
  • Run command Configuration -> Create new sfdx project (sf hardis:project:create) and select options to create a new sfdx-hardis project.
  • Open file manifest/package.xml and replace the content by the following code
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <version>59.0</version> <!-- use current latest Salesforce api version -->
</Package>
  • IF you are using Gitlab CI and sandboxes only (not scratch orgs), open gitlab-ci-config.yml at the root of the repository, and set variable USE_SCRATCH_ORGS to "false"
  • Depending your git provider, keep the related workflow files and delete the others
    • Gitlab
      • gitlab-ci.yml
      • gitlab-ci-config.yml
    • Azure
      • azure-pipelines-checks.yml
      • azure-pipelines-deployment.yml
    • GitHub:
      • Folder .github/workflows
    • Bitbucket
      • bitbucket-pipelines.yml
  • During the CI/CD setup, find variable SFDX_DISABLE_FLOW_DIFF in your git provider pipeline and set its value to true, to avoid to generate too many PR comments during setup. At the end of the setup, you can set back the variable to false.

Some workflow files contain additional configuration instructions, please read the comments at the beginning of the files !

You can now go to step Setup CI Authentication