Skip to main content
All CollectionsIntegrating Git and CI/CD
Automating Using Your CI/CD Tool
Automating Using Your CI/CD Tool
Support avatar
Written by Support
Updated this week

Protecting deployments with pull requests enables CI/CD automated jobs to run when a pull request (PR) is created or modified, before changes are applied to the environment. These jobs can utilize Salto’s CLI to perform tasks such as:

  • Salto Validation Checks: Identify Salto validation issues when a PR is created or updated.

  • Salesforce Validation Checks: Perform Salesforce validation checks upon PR creation or modification.

  • Automatic Deployment: Deploy changes automatically upon PR approval.

  • Integration with Third-Party Tools: Trigger third-party tools during the PR review process for custom integrations tailored to user needs.

Additionally, you can configure post-deployment automation to execute tasks after changes are applied to the environment, such as:

  • End-to-End (E2E) or UI Testing: Run E2E or UI tests to confirm environment stability following a configuration change.

  • Automatic Promotion: Promote deployed changes to a higher environment upon PR merge.

  • Apex Testing for Out-of-Band Changes: Execute Apex tests when a Salto fetch operation detects modifications to Apex classes or triggers.

To enable such automated jobs, the environment branch must include configuration files for the CI tool. As Salto prohibits direct pushes to the environment branch, it offers an interface for users to submit a pull request with the required CI configuration files. These can then be reviewed and merged into the environment branch.

Steps to Push Your CI Configuration Files to the Environment Branch:

  1. Start by creating a new branch based on your environment branch.

  2. Add or update your CI configuration files in the new branch, and then push your changes. Explore CI job examples for Salto deployments across different git providers

  3. Create a pull request from the new branch you’ve created, targeting your environment branch

  4. Navigate to the ‘Version Control’ section in your environment settings. Under ‘Branch Protection via Salto Pull Requests’, click the ‘Manage CI Configuration Files’ button.

  5. Select your pull request containing the CI configuration files and click ‘Merge’.

To learn how to protect your environment Git branches, follow this guide.

Did this answer your question?