Groundswell identified a need for an easier way for various DevOps teams to adapt to SFDX-based CI/CD and therefore created GS DevOps Mate, our Open Source, first-of-its-kind deployment tool. If you are familiar with this tool already, then you are in the right place! If not, feel free to read our previous blog posts below:
Please refer to the How to Configure GS DevOps Mate for Bitbucket Pipelines blog post for the Build Runtime Configuration section.
PROD_ORG_TYPE: PRODUCTION
PROD_ORG_USERNAME: Username for a QA Org user with enough rights to deploy, Create, Read and Update custom settings data, preferably someone like System Administrator
PROD_ORG_PASSWORD: Password and Security Token concatenated for the above user
e.g mySecretPasswordmySecretToken
LOGGING_LEVEL: debug
MANIFEST_VERSION: 51.0 or the latest version of package.xml
In the bitbucket-pipelines.yml file, add the following pipeline step to retrieve the full org:
Step 1: Checkout master branch ( you can configure any feature branch to act as a backup branch)
Step 2: Use GS Devops mate command sfRetrieve fullOrg-sfdx to retrieve the Production org metadata ( you can configure any org to retrieve the metadata)
Step 3: Add all the retrieved metadata to git.
Step 4: Commit the added metadata to git.
Step 5: Push the committed metadata to bitbucket server.
Step 6: We have identified a couple of metadata not supported by the sfdx retrieve command, which we need to specify in the repo explicitly.
In master branch > Add file > Give the name ignoreMetadataList.json and populate the below content.
{
"list": ["Audience", "UserProvisioningConfig", "CallCoachingMediaProvider", "CleanDataService", "ManagedContentType", "BlacklistedConsumer"]
}
Pro Tip: Remove any unsupported folders/files from your repo to execute the pipeline successfully.
Finally, we are ready to test the pipeline.
Go to Pipelines > Run Pipeline > Choose the Branch Master > Select “BackupDev” pipeline > Run.
These pipelines can be monitored and checked by clicking on the Pipelines tab.
You can schedule your pipeline to run periodically to perform the backup activity.
Go to Pipelines > Schedules > New schedule > Select Master branch > Select “BackupDev” pipeline > Choose the schedule dropdown to run the pipeline Hourly, Weekly, or Daily.
Next time, we will cover how to set up a DevOps mate in Github actions using GitFlow strategy.