Salesforce DevOps & Release Engineering
This module teaches how Salesforce applications are built, versioned, deployed, and released using DevOps tools and processes. You will learn Git, VS Code, SFDX, deployment strategies, DevOps automation tools, and release management best practices—skills required for Salesforce Admin + Developer + DevOps roles.
1. Git Basics
Git is the backbone of version control in Salesforce DevOps. Here’s how it works in practice.
Scenario Example:
You are developing a new Apex class called InvoiceHandler.
Steps:
- Initialize Repository
- Add Files
- Commit Changes
- Create Feature Branch
- Merge Feature to Develop Branch
- Push Changes to Remote Repo
Tips:
- Always pull latest changes before starting a new branch:
- Use descriptive commit messages:
2. VS Code Setup
VS Code is the primary IDE for Salesforce development.
Steps with Example:
- Install VS Code.
- Install Salesforce Extensions Pack:
- Salesforce CLI Integration
- Apex Language Support
- Lightning Web Components Support
- Connect VS Code to Salesforce Org
- Opens a browser for login.
- Alias
DevOrgallows easy referencing later. - Retrieve Metadata
- Edit Code
- Open
InvoiceHandler.clsin VS Code. - Example:
3. Salesforce CLI (SFDX)
SFDX Commands with Examples:
- Authorize Org
- Retrieve Metadata
- Deploy Metadata
- Run Apex Test
Example Test Class:
4. Retrieve & Deploy Metadata
Example: Retrieve Multiple Metadata
Example: Deploy Changes
Example Deployment with Test Run
5. DevOps Tools
a) Copado Example
- Scenario: Deploy
InvoiceHandlerfrom sandbox to production. - Create a User Story in Copado.
- Add metadata (
InvoiceHandler.cls) to the user story. - Validate deployment in Sandbox.
- Promote to Production.
b) Gearset Example
- Compare source sandbox with target org.
- Select changed metadata.
- Click Deploy.
- Run automated tests before final deployment.
c) AutoRABIT Example
- Schedule nightly deployment from Dev sandbox to QA org.
- Run regression tests automatically.
- Backup metadata before deployment.
6. Version Control Branching Strategy
Example Workflow (Git Flow):
Scenario:
- Feature branch
feature/invoice-handlerdeveloped. - PR reviewed → merged to
develop. - Release branch
release/1.0created → merged tomasterfor production.
7. Release Management Process
Example: Salesforce Release Deployment
- Plan Release
- Features: InvoiceHandler, new Flow automation
- Release window: Sunday 10 PM
- Prepare Environment
- Sync Sandbox metadata:
- Develop & Test
- Feature branch:
feature/invoice-handler - Run Apex tests:
- Deploy to Staging
- Validate
- QA executes UAT.
- Ensure InvoiceHandler triggers are working.
- Deploy to Production
- Use Copado or SFDX:
- Post-Deployment
- Verify logs and functionality.
- Document deployment results.