* bump testing-env image
* use correct image
* fix e2e tests
* fix more e2e tests
* one more try
* 0.14.10 works
* one more try
* flippign exp
* flipping tihngs around
* fixing parallel e2e tests
* Update go-generate to run as a script
It was taking forever to run via the previous Makefile command. I don't
exactly know why. Perhaps because it was passing all the packages in as
multiple arguments?
Either way, this change allows it to actually run through in about 20
minutes.
* Regenerate all mocks using latest pegomock
Pegomock version v2.9.0
* Format mocks outside of regular mocks directory.
These mocks are outside of the regular directory due to an import cycle
causing us to have to have these not under a /mocks directory so they
need to be formatted since they're not excluded.
* Add back make test target
* Upgraded conftest to 0.23.0 and removed --all-namespaces flag (#62)
* Upgraded conftest to 0.23.0 and removed --all-namespaces flag
* fix tests
* fix conftest version name
* make tests pass
* Update e2e tests to use 0.23 conftest
* Fix log function
* Make test client fetch version synchronously.
* Update fixtures.
* Pinning test image
Co-authored-by: Nish Krishnan <nishk@lyft.com>
* Add `--autoplan-file-list` server flag to allow modifying the list of files that trigger planning.
* Set default value for `--autoplan-file-list` and add `terragrunt.hcl` to the list.
* Default is handled in server now. No need for it here.
* Fix syntax error test.
* Fix e2e tests
This is two changes:
Replacing all usages of SimpleLogger with it's interface SimpleLogging which makes it easier to swap out loggers going forward
Nukes SimpleLogger in favor of StructuredLogger which allows us to better analyze logs in our log management system we choose.
* fix(output): Remove Refreshing state... from output
Since Terraform 0.14.0 there are no separator between refreshing plan and the plan.
* Fix comment typo
* Add a branch regex to the repo.yaml config to allow Atlantis to
accept only pull requests with a given base branch (the branch
a PR would merge _into_).
* `branch` is optional. By default its unset and Atlantis will match
webhooks for pull requests for any branch (no change)
Match any PR,
```
repos:
- id: /.*/
branch: /.*/
```
Match only PRs with master or main base branch.
```
repos:
- id: /.*/
branch: /(main|master)/
```
Some repos have special pull request branching practices. For example,
plan/apply from feature branches merging into master, but separate flows
for merging master into a release branch (where Atlantis isn't used).
Adding a regex allows for flexible workflow options. For example, you
could have Atlantis ignore "release" branches.
* Adding policy_check support into yaml config
* Added policy check model and runtime structs
* Adding BuildPolicyCheckCommand to ProjectCommandBuilder
* Return incorrectly deleted code
* Remove BuildAutoPolicyPlanCommand from ProjectCommandBuilder
* Split runAutoCommand into two functions
runAutoPlanCommand - does what originally RunAutoplancommand was doing
except now it returns CommandResult and []models.ProjectCommandContext
runAutoPolicyCheckCommand - accepts CommandContext, CommandResult, and
[]models.ProjectCommandContext as arguments and runs PolicyCheckStep runner
* Refactor RunCommentCommand
* Remove BuildPolicyCheckCommand and rename StepCmdExec back to TerraformExec
* Add policy step runner logic and conftest interfaces.
* Add show step runner to policy check stage.
* Adding models.PolicyCheckCommand to buildCtx
This also means buildPlanAllCommands call buildCtx twice once with
models.PlanCommand and once with models.PolicyCheckCommand
* Adding new project_command_builder that supports policy_check
* Refactoring PolicyCheck specific logic into a PolicyCheckProjectCommandBuilder
* Moving events.CommandContext to models.CommandContext this will allow me
to remove buildCtx method and move ProjectCommandContext creation into
models package
* Policy Owners might be different types, for that reason we are
refactoring Owners into its own struct with specific keys defining
different owner types
Co-authored-by: Nish Krishnan <nishk@lyft.com>
Co-authored-by: Nish Krishnan <nishkrishnan@users.noreply.github.com>
I ran into an issue where I have a directory of templates I use that I
name `foo.tf.template`. I found that Atlantis was running against this
directory and failing, which was unexpected behaviour.
This is because we're just checking if `.tf` is contained within a
filename, rather than checking if it's the suffix of the filename.
Instead, we can use regex to ensure that we're only filtering on actual
Terraform files, inclusive of `.tf` and `.tfvars` suffixes.
There are obviously some alternative ways I could get around this:
rename my templates to `foo.template` without the `.tf`.
I also really liked the idea of a `.atlantisignore` file previously
cited[1], but it was rejected in favour of explicitly defining exactly
which directories to run it in. We have a large number of directories so
this wasn't appealing to me.
I felt this behaviour was sufficiently unexpected that it was worth
making a more explicit filter.
[1] https://github.com/runatlantis/atlantis/issues/26