-
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: Add --autoplan-file-list
server flag.
#1475
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1475 +/- ##
==========================================
- Coverage 70.23% 70.23% -0.01%
==========================================
Files 94 94
Lines 6441 6457 +16
==========================================
+ Hits 4524 4535 +11
- Misses 1533 1536 +3
- Partials 384 386 +2
Continue to review full report at Codecov.
|
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.
Nice work I'm in favor of the change just a couple questions/comments.
@nishkrishnan I've updated the PR to set the default value in cmd/server.go and added |
|
… files that trigger planning.
91e0d48
to
e7e1481
Compare
e7e1481
to
55b057b
Compare
@nishkrishnan I rebased this on latest master and fixed logging issue. Any help tracking down the failing test would be appreciated. |
This adds a new server flag that allows modifying the list of files that trigger default project planning.
We use terraform/atlantis to build AWS AMI's using packer and ansible. We wanted changes to the packer (
*.pkr.hcl
) and ansible (*.yml
) files to trigger an autoplan when modified in a commit. It looked like we could do this with anatlantis.yml
file (Workflow), but we have a large repo with 100's of small projects and rely on the default atlantis workflow. Definingatlantis.yml
would require us to define every existing project, and all new projects in that workflow.Instead, I added a server flag/ENV that would allow modifying/overriding the list of file patterns that trigger an autoplan.
--autoplan-file-list
uses the same dockeringore syntax as Custom workflows autoplanwhen_modified
. This allows for overriding the default list, adding more file types, and file exclusions.Examples:
--autoplan-file-list="**/*.tf,**/*.tfvars,**/*.tfvars.json"
--autoplan-file-list="**/*.tf,**/*.tfvars,**/*.tfvars.json,**/*.pkr.hcl,**/*.yml"
ATLANTIS_AUTOPLAN_FILE_LIST="**/*.tf,**/*.hcl"