If your Salto organization was created before December 2nd, 2024, CI files must be pushed to a dedicated branch instead of the environment branch. For more details, please refer to this article.
To upgrade your Salto organization and adopt the new branching strategy, please reach out to our support team for assistance.
Protecting deployments with pull requests enables the use of CI/CD automated jobs triggered upon the creation or modification of the PR. These automated jobs can utilize Salto’s CLI to perform tasks such as deployment preview checks, validation runs, deployment or promotion of changes, or even integrations with other third-party tools the user wants to trigger.
To enable automated jobs upon PR creation or modification, configuration files for the CI tool must be included in the environment branch. However, Salto restricts direct pushes to the environment branch. Instead, Salto provides an interface that allows users to submit a pull request containing the required CI configuration files targeting the environment branch, which can then be merged.
Steps to Push Your CI Configuration Files to the Environment Branch:
Start by creating a new branch based on your environment branch.
Add or update your CI configuration files in the new branch, and then push your changes. CI files examples for Salto can be found here
Navigate to the ‘Version Control’ section in your environment settings. Under ‘Branch Protection via Salto Pull Requests’, click the ‘Manage CI Configuration Files’ button.
Select your pull request containing the CI configuration files and click ‘Merge’.
To learn how to protect your environment Git branches, follow this guide.