In an sfp-powered project, releasing involves orchestrating the deployment of multiple artifacts (built packages) to target environments in a controlled, repeatable manner. The release process ensures consistency, traceability, and reliability across your Salesforce environments.
Key Components
Release Definition
A YAML file that specifies:
Which artifacts (packages and versions) to deploy
The release name and configuration
Deployment behavior (skip if installed, promotion settings)
Changelog generation settings
Release Commands
sfp provides several commands for managing releases:
Command
Purpose
Use Case
sfp release
Deploy artifacts to an org
Production deployments, environment updates
sfp releasedefinition:generate
Create release definition from artifacts
Automated release preparation
sfp repo:patch
Apply release to a branch
Hotfixes, branch synchronization
sfp changelog generate
Generate release changelog
Documentation, compliance
Release Workflow
1. Build and Publish Phase
After code is merged to your main branch:
2. Release Definition Generation
Create a release definition for your target environment:
3. Deployment Phase
Deploy the release to your target environment:
4. Post-Release Activities
After a successful release:
Release vs Install
sfp provides two deployment commands with different use cases:
sfp install
Installs artifacts from a local directory
Used for development and testing
Direct, simple deployment
Example:
sfp release
Fetches artifacts from a registry
Uses release definitions for consistency
Generates changelogs
Handles complex multi-artifact deployments
Example:
Release Strategies
Progressive Deployment
Deploy through environments progressively:
Hotfix Strategy
For urgent production fixes:
Rollback Strategy
Prepare for potential rollbacks:
Domain-Based Release Configuration
sfp uses Release Configs to organize packages by domain. These configs define which packages belong to a domain and control various aspects of the release process:
Key points about release configs:
They define domains (logical groupings of packages), not environments
Packages must be explicitly listed in includeOnlyArtifacts
The same domain configuration is used across all environments (dev, uat, prod)
They control validation pools, changelog generation, and deployment behavior
The release definition generated from these configs determines which versions of packages are deployed to each environment.
# 1. Deploy to UAT
sfp release --path release-uat.yaml --targetusername uat
# 2. Validate in UAT
# ... testing ...
# 3. Deploy to Production
sfp release --path release-prod.yaml --targetusername prod
# 1. Patch production state to hotfix branch
sfp repo:patch \
--releasedefinitions current-prod-release.yaml \
--sourcebranchname main \
--targetbranchname hotfix/urgent
# 2. Make fixes and build
sfp build --branch hotfix/urgent
# 3. Release hotfix
sfp release --path hotfix-release.yaml --targetusername prod
# 4. Sync hotfix back to develop
sfp repo:patch \
--releasedefinitions hotfix-release.yaml \
--sourcebranchname develop \
--targetbranchname feature/hotfix-sync
# Before release, save current state
sfp releasedefinition:generate \
--gitref main \
--releasename "rollback-snapshot" \
--directory rollbacks
# If rollback needed
sfp release \
--path rollbacks/rollback-snapshot.yaml \
--targetusername prod