-
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 top-level repo level configs without projects defined #2853
feat: Allow top-level repo level configs without projects defined #2853
Conversation
This will enable top-level keys to be set in `atlantis.yaml` even when using autoplanning strategy.
Signed-off-by: Mattias Ängehov <[email protected]>
Very nice @MattiasAng ! cc: @csainty please review if you get a chance |
automerge = repoCfg.Automerge | ||
parallelApply = repoCfg.ParallelApply | ||
parallelPlan = repoCfg.ParallelPlan | ||
} |
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.
looks good. I got that buildAllProjectCommands
consider these changes in buildProjectCommandCtx
. But plan
uses specific buildPlanAllCommands
method and it doesn't support this feature. So this PR changes buildPlanAllCommands
👌
BTW, events.DefaultAutomergeEnabled
and raw.DefaultAutomerge
are duplicated. How about changing them and removing events.DefaultAutomergeEnabled
?
automerge := raw.DefaultAutomerge
parallelApply := raw.DefaultParallelApply
parallelPlan := raw.DefaultParallelPlan
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.
@MattiasAng would you consider the above changes before merging?
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.
👍
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.
#2853 (comment) is optional, so approved for now.
Thank you @MattiasAng ! This is a very helpful contribution! |
You guys work fast! Sorry, didn't have time to fix the one comment but see it was quite minor. 🙂 Thanks for the fast merge! |
Hmm @csainty and @MattiasAng, without digging through the code of both PRs, what is the major difference between this PR #2853 and PR #2300 ? They share a similar title. |
@nitrocode The previous PR didn't actually parse the values from atlantis.yaml, it used the default global ones. It actually confused me as well first when I couldn't get it to work. 🙂 |
what
In #2300 support for parsing
atlantis.yaml
withoutprojects
defined was added, but it did not add support for handling the configuration itself.This pull request adds support for parsing
parallel_plan
,parallel_apply
andautomerge
and overriding the default values by specifying them inatlantis.yaml
.why
references