mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-06 01:58:34 +00:00
Automerging merges pull requests automatically if all plans have been successfully applied. * Save status of PR's to BoltDB so after each apply, we can check if there are pending plans. * Add new feature where we delete successful plans *unless* all plans have succeeded *if* automerge is enabled. This was requested by users because when automerge is enabled, they want to enforce that a pull request's changes have been fully applied. They asked that plans not be allowed to be applied "piecemeal" and instead, all plans must be generated successfully prior to allowing any plans to be applied.
1.4 KiB
1.4 KiB
Automerging
Atlantis can be configured to automatically merge a pull request after all plans have been successfully applied.
How To Enable
Automerging can be enabled either by:
- Passing the
--automergeflag toatlantis server. This will cause all pull requests to be automerged and any repo config will be ignored. - Setting
automerge: truein the repo'satlantis.yamlfile::::tip NOTE If a repo has anversion: 2 automerge: true projects: - dir: .atlantis.yamlfile, then each project in the repo needs to be configured under theprojectskey. :::
All Plans Must Succeed
When automerge is enabled, all plans in a pull request must succeed before any plans can be applied.
For example, imagine this scenario:
- I open a pull request that makes changes to two Terraform projects, in
dir1/anddir2/. - The plan for
dir2/fails because my Terraform syntax is wrong.
In this scenario, I can't run
atlantis apply -d dir1
Even though that plan succeeded, because all plans must succeed for any plans to be saved.
Once I fix the issue in dir2, I can push a new commit which will trigger an
autoplan. Then I will be able to apply both plans.
Permissions
The Atlantis VCS user must have the ability to merge pull requests.
