Limiting Validation by Domain
Validation processes often need to synchronize the provided organization by installing packages that differ from those already installed. This task can become particularly time-consuming for large projects with hundreds of packages, especially in monorepo setups with multiple independent domains.
Using Release Configurations
To streamline the validation process and focus it on specific domains, you can use release configurations with the --releaseconfig
flag. This approach limits the scope of validation to only the packages defined in your release configuration, significantly enhancing efficiency and reducing validation time.
Basic Usage
sfp validate org -o ci \
-v devhub \
--mode thorough \
--releaseconfig=config/release-domain-sales.yml
In this example, validation is limited to packages defined in the release-domain-sales.yml
configuration file. Only packages that:
Are listed in the release configuration AND
Have changes compared to what's installed in the org
will be validated.
Multiple Domain Configurations
For projects with multiple independent domains, you can specify multiple release configurations:
sfp validate org -o ci \
-v devhub \
--mode thorough \
--releaseconfig config/release-sales.yml \
--releaseconfig config/release-service.yml
Benefits of Domain-Limited Validation
Faster Feedback: Validate only the relevant packages for your team's domain
Reduced Dependencies: Avoid failures from unrelated packages in other domains
Parallel Development: Multiple teams can work independently without blocking each other
Optimized CI/CD: Shorter validation times mean more efficient pipeline execution
Example Release Configuration
# config/release-sales.yml
name: Sales Domain
includeOnlyPackages:
- sales-core
- sales-ui
- sales-integrations
- opportunity-management
- quote-management
skipPackages:
- sales-deprecated
Combining with Other Options
With Diff Check
sfp validate org -o ci \
-v devhub \
--diffcheck \
--releaseconfig=config/release.yml
With Individual Mode
sfp validate org -o ci \
-v devhub \
--mode individual \
--releaseconfig=config/release.yml
With Branch References
sfp validate org -o ci \
-v devhub \
--ref feature-branch \
--baseRef main \
--releaseconfig=config/release.yml
Best Practices
Organize by Domain: Create separate release configurations for each logical domain
Keep Configurations Updated: Regularly review and update package lists in release configs
Use in CI/CD: Automate domain-specific validation in your pipeline
Document Dependencies: Clearly document cross-domain dependencies in your configurations
Note: The deprecated
--mode=thorough-release-config
and--mode=ff-release-config
have been replaced by using the standard modes with the--releaseconfig
flag. This provides the same functionality with a simpler, more consistent interface.
Last updated