Commit Graph

106 Commits

Author SHA1 Message Date
Luke Massa
34ef59d132 chore: Upgrade yaml v3 (#4172)
* fix(deps): update module gopkg.in/yaml.v2 to v3 in go.mod

* chore: Upgrade to go-yaml v3

* Fix comment

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2024-01-25 13:09:34 -05:00
Luke Massa
6cad7e6482 chore: Remove settings for require approval, mergeable, undiverged (#4047)
* Remove settings for require approval, mergeable, undiverged

* Fix
2023-12-27 16:11:45 +00:00
Luke Massa
a828ee866c Add missing test flags (#4064) 2023-12-17 20:33:25 -08:00
Luke Massa
d643c521ab feat: Remove flag for allow repo config (#3911)
* Remove option to allow repo

* Fix internal test

* Fix fmt

* Fmt

* Fix rebase

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Co-authored-by: Dylan Page <dylan.page@autodesk.com>
2023-12-12 03:24:38 +00:00
Luke Massa
fb484ad8eb feat: Remove flag for disable apply (#3912)
* Add code for disabling apply flag

* Better comment
2023-12-11 20:29:21 -05:00
Gabriel Martinez
56e38b4151 chore(atlantis): fix linter errors (#3690)
* chore(atlantis): fix linter errors

* fix superfluous-else

* revert gitlab check

* ignore stub funcs on azuredevops_client

* remove fetch-depth

* remove fail_on_error

* fix plan_step_runner_test.go

* more lint fixes

---------

Co-authored-by: Dylan Page <dylan.page@autodesk.com>
2023-12-11 19:02:16 +00:00
jskrill
00aae565b2 feat: add autodiscover enabled feature (#3895)
* add flag to allow the user disable the autodiscover

* add global config and doc

* feat: Implement autodiscover.mode

* fix: Minor doc fixes

* fix: Small fixes to docs/indent/tests

* fix: Line length, quoting, function comments

* fix: Add a few more tests and remove newlines

* fix: Always camel case never snake

---------

Co-authored-by: Marcelo Medeiros <m.medeiros@carepay.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-29 15:43:53 -08:00
Luke Massa
9bc94dee14 feat: remove silence whitelist errors flag (#3923)
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-09 14:36:35 -08:00
Koen van Zuijlen
786e57c1d6 feat: Added disable-unlock-label config option (#3799)
* Added disable-unlock-label config option

* Fixed tests

* Wrote tests + fixed mistakes

* Added docs

* added defaults to docs

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-10-10 11:02:26 -04:00
Ghais Zaher
80ecc38273 feat: disable autoplan label (#3649)
* feat: disable autoplan label

* documentation

* revert unrelated change

* fix property

* gitlab and github

* dd more test

* small fixes

* add tests for github and gitlab clients

* fix: remove unrelated comments

* fmt

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-09-25 13:43:35 -04:00
Ross Strickland
76c482b83a feat: global repo params (#3379) 2023-07-07 18:33:21 -04:00
Pantelis Karamolegkos
8eb91d0259 Using constants for checkout strategies (#3384)
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-06-20 14:52:06 -04:00
Ken Kaizu
da48fb515d chore(test): add no test dir tests, rename testdata dir (#2986)
* add web_templates render tests

* add ansic strip tests

* move fixtures into testdata dir which is golang specific test dir name

* add server/metrics tests

* add recovery test

* add runtime stats test
2023-01-15 23:14:23 -06:00
Ken Kaizu
f09a9d4c01 feat: --allow-commands restricts available atlantis commands (#2877)
* feat: --allow-command configuration restricts available atlantis commands

* add version and approve_policies into allow commands defaults

* allow-commands accept all keyword which allows all commands

* remove redundant nest

* more detail abount allow-commands all keyword

* Update server/events/comment_parser.go
2022-12-27 22:52:39 -06:00
Sebastian Poxhofer
01a9a5f5a7 feat: dismiss approvals when planning (#2696)
* feat: dismiss approvals when planning

* feat: add pagination and move query in separate method

* tests: add test for dismissing

* refactor: fix linting issue

* implement change requests

* Update cmd/server.go

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2022-12-18 22:31:10 -06:00
Fabiano Soares Honorato
66dc30e755 feat: prevent planning and applying directories outside PR scope using --restrict-file-list (#2440)
* Add --strict-plan-file-list config

* Update server.go

* Update server-configuration.md

* Update server_test.go

* Run gofmt -w

* Add --strict-plan-file-list for projects

* Add --strict-plan-file-list tests

* Change --strict-plan-file-list to --restrict-file-list

* Update --restrict-file-list documentation

* Update --restrict-file-list and --enable-regexp-cmd documentation

Co-authored-by: Fabiano Honorato <fabiano.honorato@ifood.com.br>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2022-12-09 09:33:40 -06:00
noah
61bcfbab2b feat: auto-plan projects when modules change (#2507)
* feat: auto-plan projects when modules change

Fixes #920

* rename Downstream->Dependent; docs cleanup

* chore: gofmt -s
2022-11-28 14:12:29 -08:00
Ross Strickland
d620d5de98 Add custom templating support (#2647)
* added custom templates support

* made default templates DRY

* Change init to anonymous function.

* Initialize anonymous function inside var

* - Add flag/cfg param for custom template dir
- Add test for custom template

* Add documentation.

* Address PR comments.

Co-authored-by: Ricard Bejarano <ribejara@thousandeyes.com>
2022-11-11 09:56:33 -06:00
Daniel Thompson
ab2cdb833a External Locking DB: Redis (#2491)
* Initial build out of redis backend

* Regenerate locking mocks and matchers

* More test cleanup

* More test fixes

* Added tests for redis

* Test fix

* Linting fix

* Dcos update

* Update redis.go

* Update server.go

* Adding nolint to RedisDB struct
2022-09-07 16:57:06 -07:00
Casper Biering
abb9e41787 fix: Log streaming broken with TFE local execution mode (#2364) 2022-07-12 08:53:55 -07:00
Li Lin
6b0fe76f4e Add --var-file-allowlist in server configuration (#2362) 2022-07-07 10:32:18 -07:00
Nish Krishnan
d1d1539ced feat: Add stats support for basic operations (#2147) 2022-03-18 15:18:13 -07:00
Eng Zer Jun
38cf7b0141 refactor: move from io/ioutil to io and os package (#1843)
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-10-07 00:37:42 -04:00
Enoch Lo
89236d8e54 Add flag to enable markdown diff formatting (#1751) 2021-08-30 14:01:52 -07:00
David Haven
01b8718509 allow user to pass gh-app-key directly instead of filename (#1706)
* allow user to pass gh-app-key directly instead of filename

* start fixing tests

* fix make test

* update website with info about new flag

* Apply suggestions from code review

Co-authored-by: Roberto Hidalgo <un@rob.mx>

Co-authored-by: Roberto Hidalgo <un@rob.mx>
2021-08-17 22:02:01 -07:00
Gábor Lipták
a4f0e3a467 Bump golangci to 1.39.0 (#1541)
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2021-05-26 21:00:20 -04:00
Brian Zoetewey
f290780b61 feat: Add --autoplan-file-list server flag. (#1475)
* 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
2021-04-22 09:48:40 -07:00
Dylan Page
25103d72f4 feat: add new flag --silence-no-projects (#1469)
* feat: add new flag --silence-no-projects

* refactor: add tests, clean up command_runner logic

* fix: attempt at fixing PolicyCheck e2e test

* docs: add silence-no-projects flag to server-configuration.md

* docs: fix grammar

* fix: requested changes: commit status resets, misc fixes

* fix: status check comments to actually reflect their commands

* fix: logic bug in autoplan commit reset

* fix: tests make check-lint errors
2021-04-19 14:52:56 -07:00
Nish Krishnan
7ac8106f8a Add structured logger (#54) (#1467)
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.
2021-04-06 12:02:25 -07:00
laurent apollis
d2ef2775c8 Support regexp in command builder on the project name (#1419) 2021-03-05 16:13:23 -08:00
Sarvar Muminov
af2a806870 Implement a new policy check workflow (#1317)
* 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>
2021-02-10 18:13:44 -08:00
Gerald Barker
1137a82c60 Add the ability to disable Atlantis locking a repo (#1340)
* Add the ability to disable Atlantis locking a repo

* Fix incorrect logic when creating locking Client

Co-authored-by: kbaldyga <kbaldyga@gmail.com>

* Add tests for noOpLocker to improve coverage

Co-authored-by: Gerald Barker <geraldbarker@mail.com>
Co-authored-by: kbaldyga <kbaldyga@gmail.com>
2021-01-14 10:20:27 -05:00
Nish Krishnan
1513ee6421 Add support for fetching gh app user. (#30) (#1334)
* Add support for fetching gh app user. (#30)

* Upgrade pegomock.

* go mod vendor.
2021-01-05 15:21:31 -08:00
Gerald Barker
d2610a78af Add Option to globally disable apply (#1230)
* Add Option to globally disable apply

Co-authored-by: Gerald Barker <geraldbarker@mail.com>
2020-10-27 21:01:39 -07:00
dmattia
c24c5009aa configure using default 2020-09-03 11:09:45 -05:00
dmattia
605dde7b2b Fix typos 2020-09-03 10:57:52 -05:00
Luke Kysow
cd37563857 Merge pull request #1159 from runatlantis/disable-autoplan
Disable autoplan global flag
2020-08-18 15:59:59 -07:00
Luke Kysow
1b374fa3e6 Small refactor to disable-autoplan 2020-08-18 15:55:22 -07:00
ValdirGuerra
34f9f3f348 Add support for disable autoplan from server config 2020-08-18 15:55:22 -07:00
Quan Hoang
54e3dc2ef0 Skip cloning PR repository in case of no projects configured in repo config file were changed 2020-08-18 15:48:05 -07:00
Luke Kysow
8ac19e4017 Deprecate --repo-whitelist for --repo-allowlist 2020-07-25 23:50:09 -07:00
Luke Kysow
875abf1362 Refactoring to github app code
- rename gh-app-key to gh-app-key-file for clarity
- change git credentials writer to append a line if there is an existing
.git-credentials file and in the case of the github app to replace the
old github app line
- removed automatically setting --write-git-creds to true when using a
github app and instead requiring this is set specifically
2020-06-19 11:41:44 -07:00
rob
011d3f8229 Test against a live repo, fix accordingly
more docs, add installation step
2020-06-03 20:25:11 -04:00
Roberto Hidalgo
199cdfe192 Play around with github app credentials 2020-06-03 20:16:24 -04:00
CJ Ketchum
d7ce63742e Add test for plan-draft behavior 2020-05-25 16:45:38 -07:00
Christopher Ketchum
c300dee745 Add flag to toggle autoplanning on draft PRs 2020-05-25 16:28:55 -07:00
CJ Ketchum
611ed55c8c Fix parse URL tests 2020-04-10 14:36:53 -07:00
John Reese
e7dda13d65 Ignore casing on log levels 2020-04-03 20:56:54 -04:00
Mike Hume
35b6a1bdb2 Merge branch 'wrapped-default' into long-folding 2020-03-29 15:36:53 -07:00
CJ Ketchum
bc545844d3 Update autoplan so commit status is set only after finding projects (resolves #954) 2020-03-29 15:12:12 -07:00