Commit Graph

153 Commits

Author SHA1 Message Date
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
dmattia
d1fe029438 Added configurable parallelism pool size 2020-09-03 10:51:40 -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
rob
227ce9cbf4 Upgrade to github/v31 for CompleteAppManifest
split fixtures out elsewhere, add working dir test
2020-06-03 20:18:13 -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
Luke Kysow
80347f4c1d Merge remote-tracking branch 'origin/master' into hide-comments 2020-04-15 21:47:58 -07:00
Luke Kysow
6e8b4eed16 Small refactor 2020-04-15 21:44:34 -07:00
CJ Ketchum
611ed55c8c Fix parse URL tests 2020-04-10 14:36:53 -07:00
John Reese
f51be62cc3 Remove EqualFold from log level comparison 2020-04-06 12:26:07 -04: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
Luke Kysow
b69336e477 Refactor cmd tests
- Remove config/env/flag override tests since we know that the overrides
work
- We'll no longer need to edit the tests now when we add new flags
2020-03-29 14:51:03 -07:00
Mike Hume
62d3522d33 Adding --fold-long-output flag to toggle wrapped default 2020-02-18 01:48:28 -08:00
Sam Park
782501b8e9 Add a flag to control hiding behavior 2020-01-24 22:09:29 -08:00
Josh Soref
2cf5b0a42a Spelling (#902)
Spelling fixes
2020-01-20 12:46:00 -06:00
Luke Kysow
46f33e6a22 Add missing tests 2020-01-20 10:39:05 -06:00
Luke Jolly
e84755349c Add Silence flags to server_test.go 2020-01-20 10:30:15 -06:00
Luke Jolly
18208abdfc Added flag --silence-fork-pr-errors 2020-01-20 10:30:14 -06:00
Luke Kysow
ec92e43d4b Refactor --vcs-status-name flag. 2020-01-20 10:16:59 -06:00
Tim Birkett
d6cfe5b20e Add status-name command line arg, config and tests 2020-01-20 10:11:21 -06:00
Luke Kysow
823263094c Merge pull request #903 from runatlantis/download-url
Add `--tf-download-url` flag
2020-01-20 09:22:53 -06:00
Luke Kysow
84e41ce110 Refactor -tf-download-url flag changes.
* Fix bad ordering of args calling NewClient()
* Make error messages clearer
2020-01-20 09:19:54 -06:00
Cullen McDermott
d4362ffec3 Add --tf-download-url configuration option 2020-01-20 09:19:54 -06:00
Luke Kysow
1971f52728 Fix typo 2019-11-27 09:38:54 -08:00
Luke Kysow
52c9189325 Only warn about azdo if flag set 2019-11-26 15:50:48 -08:00
Luke Kysow
fed2f59b85 Merge pull request #813 from runatlantis/azdo
Small refactoring to azure devops support
2019-10-25 18:11:15 -07:00
Luke Kysow
07ffe179e7 Small refactoring to azure devops support 2019-10-25 18:07:18 -07:00
Luke Kysow
774b6da2ba Merge pull request #719 from mcdafydd/azure-devops
Azure Devops support
2019-10-25 18:02:28 -07:00
Andrew Jeffree
a9c843d2f2 Configure git to use https instead of ssh. 2019-10-25 10:59:50 +11:00
David McPike
495cf76efd Azure Devops update
- Remove org and project configs
- Add support for WriteGitCreds
2019-09-23 08:24:59 -05:00
David McPike
a6779bb157 Update Azure Devops docs; fix typo 2019-09-22 17:27:34 -05:00
David McPike
ba3808e91a Fix environment variable typo 2019-09-22 16:51:35 -05:00
David McPike
b6dca2b05b Removes ADBasicAuth boolean flag 2019-09-22 16:35:16 -05:00
David McPike
a31afcb7a4 Merge tag 'v0.9.0' into azure-devops 2019-08-29 17:52:36 -05:00
Andrew Jeffree
e140823408 Add flag for configuring git-credentials-store
--write-git-creds will create a .git-credentials file and configure
git to use it. To allow authentication with your git remotes over https.
To access private repos.
2019-08-02 10:12:30 +10:00
David McPike
acef89adc4 Azure Devops PR minor cleanup, fix tests, checks
- Re-write tests for azuredevops_client
- CircleCI checks should pass
- NewAzureDevopsClient() now takes a hostname like NewGithubClient()
- Docs include comment about default merge strategy requirements
2019-07-28 10:37:45 -05:00