feat: Disable policy check on some repositories#3503
feat: Disable policy check on some repositories#3503GenPage merged 5 commits intorunatlantis:mainfrom
Conversation
|
@AndreZiviani - I was only able to take a quick look today. I'll try to give this a more thorough lookover tomorrow. Can you add an e2e test? |
|
@rkstrickland I wasn't sure where to add the tests, let me know if there is somewhere better and if those are enough |
484771f to
34a46b7
Compare
|
@AndreZiviani - For e2e test, you'd want to add a cases here: https://github.com/runatlantis/atlantis/blob/main/server/controllers/events/events_controller_e2e_test.go#L816 Try to account for various conditions where policy check is enabled/disabled in opposing fashion between global and repo config. |
|
@rkstrickland I had a hard time figuring out how to run them (was trying to run the |
|
hey @rkstrickland just a friendly reminder to review this PR :) |
| ``` No newline at end of file | ||
| ``` | ||
|
|
||
| ## Running policy check only on some repositories |
There was a problem hiding this comment.
If i understand the changes correctly, the configuration could be denied explicitly globally and enabled on desired repos too, right?
There was a problem hiding this comment.
correct, in order to not break backwards compatibility you have to enable it globally (via --enable-policy-checks) and exclude the repositories that you want
|
This change seems to make sense and appears to have good test coverage. |
d155e29 to
61024ac
Compare
|
i've been using this feature on my production for couple weeks now. seems good. |
|
Thank you for the contribution |
* feat: Allow enabling policy check per repository * chore: Tests * chore: Docs * chore: Improve tests * chore: E2E tests
* feat: Allow enabling policy check per repository * chore: Tests * chore: Docs * chore: Improve tests * chore: E2E tests
what
Allows the user to disable policy checking on some repositories
why
Policy checking is really usefull but sometimes we may want to disable it on some repositories, currently we would need a separate Atlantis instance for that
tests
Tested only some standard cases locally, will be running this change in our environment next week
references