-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow for negations in repo allowlist #3414
Conversation
Thanks for the contribution @lukemassa LGTM @GenPage @nitrocode any thoughts? |
@GenPage @nitrocode any thoughts here? |
The naming of this flag is unclear to me without reading the description. It's not so much a Allow us to discuss this internally. |
I agree with @nitrocode the name could be confusing with some people. |
Yeah that makes sense. Either works for me, happy to change if that's the preference. |
let's change it to |
For consistency it should be probably be Although another option might be, instead of having
|
@lukemassa if we can avoid adding another flag and contain the new feature with the existing allowlist, that is more ideal. |
Cool I'll give this a shot! |
ae35697
to
8ecb42c
Compare
@GenPage @nitrocode @jamengual I've updated the code, comment, and PR summary to contain the changes in the existing flag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lukemassa LGTM
2ff1704
to
7dc6b64
Compare
Hey @lukemassa I have atlantis deployment files somewhere under So, I have tried different combinations like I basically add the negation part at the beginning of my existing allow-list, like this: However, it does not work. I read your code changes and it should work but your tests does not seems to be including any wildcard negations. Although, when I add the full path, it does not work either! I am using atlantis 0.26.0 which includes your features. It would be great if you could help with this. Thanks :) |
@kevin-fitlg note that my change didn't affect the According to the documentation for https://www.runatlantis.io/docs/server-configuration.html#autoplan-file-list it uses the docker ignorefile syntax (https://docs.docker.com/build/building/context/#matching). I hope this helps! |
* feat: Omit repos from allowlist * Add quote in comment * Better comment * Remove test
* feat: Omit repos from allowlist * Add quote in comment * Better comment * Remove test
what
Update the flag an optional flag
--repo-allowlist
to allow for rules that begin with!
to omit repos.Existing allow lists (as long as they don't have rules that start with
!
) would be unaffectedwhy
In general, useful to be able to exclude repos included by a glob. As a specific example, in our setup, we have repos foo/* that we want to be tracked by atlantis, but sometimes we want to omit a repo to do some testing, so this will allow us to do
--repos-allowlist='foo/*,!foo/bar'
.tests
I searched the whole repo for "allow.?list" and updated each place it occurred.
I added several unit tests to the previous code that matched the allow list.
references
Closes #1180