Commit Graph

737 Commits

Author SHA1 Message Date
Gerald Barker
7ce8cef307 Fix regression - Delete .terraform.lock.hcl if it was created by terraform init (#1701)
* Delete .terraform.lock.hcl prior to terraform init if it is not staged

* Changes suggeted by reviewer
2021-08-30 14:53:49 -07:00
Ken Kaizu
42940421a2 Split Gitlab Server comments if over max length (#1755) 2021-08-30 14:39:04 -07: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
Masayuki Morita
fe31bc6243 Fix typo (#1754) 2021-08-17 10:23:48 -07:00
Aayush Gupta
44e898c33a Refactor Apply Requirements into a Handler. (#1729) 2021-08-06 14:03:12 -07:00
Lucas C
552e4a29e7 Fixing apply permission when MR status is draft (#1736) 2021-08-04 12:34:44 -07:00
Pavel Golubev
ebf3db4051 fix ignore of --parallel-pool-size flag (#1705) 2021-08-03 11:03:23 -07:00
Lucas C
cbef84fe09 feat: improving apply requirements for mergeable on Gitlab (#1675)
* Improving apply requirements for mergeable on Gitlab

* Fixing end of line

* Renaming variables

* Renaming variables

* Fixing variable assignment

* Fixing variable assignment
2021-08-02 13:34:11 -07:00
Pat Sier
d358857e80 feat: add version command (#1691) 2021-07-12 11:10:15 -04:00
Taavi Tani
d451167175 fix: TFE remote ops detection for >= tf 1.0.0 (#1687) 2021-07-07 16:48:49 -04:00
Nish Krishnan
d914eafd2a Move core workflow packages under core. (#1684)
* Move core workflow packages under core.

* lint.
2021-07-01 12:54:44 -07:00
Nish Krishnan
4b2e5745df Fix regression introduced in approve policy command workflow. (#82) (#1672) 2021-06-29 08:48:12 -07:00
giuli007
528ee85ea8 Always use the default workspace directory when building commands context (#1620)
When pre_workflow_hooks is being used to generate atlantis.yaml
and projects are set with specific workspaces different than "default",
a different directory is created for each project-workspace pair,
but all those that are not on the "default" workspace will
not have an atlantis.yaml file at their root.

This change ensures that when atlantis is building the projects commands
for either:
- a project-specific plan, triggered via (atlantis plan -d foo -w bar)
- a project-specific apply, triggered vi (atlantis apply -d foo -w bar)
- or applies for all the plans it can find (atlantis apply)
it uses the default workspace to find the atlantis.yaml config.

Co-authored-by: giuli007 <giuglioz@gmail.com>
2021-06-24 10:16:47 -07:00
Gerald Barker
0927464b7e Move argument deduplication logic to a utility package (#1660) 2021-06-24 08:33:38 -07:00
chroju
e0f5b83aa7 Fix plan summary when changes outside of terraform is detected (#1593) (#1594)
Co-authored-by: chroju <chroju@users.noreply.github.com>
2021-06-24 08:30:31 -07:00
Gerald Barker
cd9d5b2fce Dont add -upgrade of the lock file exists & dedupe extra args (#1651) 2021-06-23 11:51:10 -07:00
Sarvar Muminov
0ed7a43e59 Fix policy check loading the tf version (#1658) 2021-06-23 11:48:55 -07:00
Sarvar Muminov
7607c154cb revert previous commit 2021-06-23 11:30:07 -07:00
Sarvar Muminov
3b08952168 Load terraform version from the required_version block 2021-06-23 11:24:55 -07:00
Marius Hennecke
b9802f71a4 set azure devops max comment characters to api limit (#1585) 2021-06-22 19:31:01 -04:00
Rui Chen
b6b60aab2c fix the build
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-06-22 19:19:54 -04:00
Spiros Economakis
e48f80359b Add an extra flag to disable automerge with comment apply (#1533)
```
atlantis apply --auto-merge-disabled
```

Issue: #1245
2021-06-22 09:33:07 -07:00
Marius Hennecke
aef146fba0 add run step environment variable SHOWFILE (#1611) 2021-06-22 09:32:21 -07:00
tkishore1192
1f0cb3f6f0 standardised logging timestamp to ISO8601 (#1625)
Co-authored-by: T <kishore.t@lowes.com>
2021-06-18 15:52:25 -04:00
Paul Calley
6b50e84ab9 Add undiverged apply requirement (#1587)
* ORCA-731 Force PR authors to rebase if master has diverged (#70)

* initial commit for undiverge apply req

* Update documentation

* Fix existing unit tests

* HasDiverged unit test

* project command runner unit test

* Global config tests cases

* update parser unit tests

* Update project_test unit tests

* Fix linting

* fix test case with logging output

* add space on readme markdown

* Remove unused variable

* remove deprecated flag option

* Use global args struct instead of passing in args

* Fix merge issue
2021-06-03 14:35:30 -07:00
Nish Krishnan
712498da58 Refactor controllers into package. (#1597) 2021-06-01 11:58: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
Sarvar Muminov
2a6f21e85d Attempting to fix e2e test (#1595)
* Attemting to fix e2e test

* remove comma

* no-op change

* scope down the fixtures

* remove unnecessary comment
2021-05-21 21:39:36 -07:00
rui
6468f1941b fix broken tests (#1590)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-05-21 11:00:49 -04:00
Sarvar Muminov
dbce1d71e7 bump testing-env image (#1582)
* 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
2021-05-14 10:00:48 -07:00
Sarvar Muminov
805e94e7f6 Update conftest version to 0.25.0. (#1579)
Version 0.25.0 solves OOM issue described in [556](https://github.com/open-policy-agent/conftest/pull/556).
2021-05-13 14:05:06 -07:00
Marius Hennecke
40ffdd144f fix: use git diff for modified files, fixes #1397 (#1568) 2021-05-11 19:37:07 -04:00
Marc Barlo
ce57344b0e Nil pointer dereference when userConfig.DisableRepoLocking is true (#1557)
* init applyLockingClient when repo locking is disabled

* move applyingLockingClient init out
2021-05-10 19:53:35 -04:00
Marc Barlo
d98474a4aa Fix ParallelPlan and ParallelApply out of order in buildProjectCommandCtx (#1574)
* Fix regression - paralle plan / apply out-of-order

* Add test to check we're correctly setting ParallelPlan/Apply

* Add project command builder tests to check args

* rm vendor
2021-05-10 19:33:21 -04:00
Istvan Tapaszto
429235d40a DeleteSourceBranchOnMerge issue fixed (#1560) 2021-05-10 14:42:12 -04:00
Dogers
bc2b390431 Update Terraform 0.11.14 version to latest 0.11.15 (#1564)
* Update Docker file to 0.11.15 for PGP issue

* Update other references to TF 0.11 to latest 0.11.15
2021-05-10 13:58:36 -04:00
Marius Hennecke
1777be406e Get modified Azure DevOps PR files from commit and changes API endpoint (#1521)
* get modified ado pr files from commit and changes endpoint, fixes #1397

* Add missing error handling
2021-05-05 17:35:20 -04:00
Nish Krishnan
79309ed39c [ORCA-559] Fix hide previous command logic (#37) (#1549) 2021-05-03 12:47:23 -07:00
Nish Krishnan
9b28e8e940 Add extra args support to policy check step runner. (#1543)
* Add extra args support to policy check step runner.

* Fix tests/mocks.

* Update docs.
2021-04-30 14:37:54 -07:00
Luke Kysow
a597bbbb5a Regen mocks with latest pegomock and update scripts (#1524)
* 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
2021-04-23 09:26:35 -07:00
Sarvar Muminov
f0201e9eb7 Upgrade conftest version to 0.23 (#1516)
* 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>
2021-04-22 20:21:17 -07:00
Istvan Tapaszto
632460b20b Delete source branch on merge (#1357)
Co-authored-by: Tapaszto, Istvan <istvan.tapaszto@msciintegration.onmicrosoft.com>
2021-04-22 09:54:18 -07: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
Wojciech Krysmann
0886b280f9 Add plan summary to unfolded part of comment (#1518) 2021-04-22 09:14:44 -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
df106ded11 Make policy checks its own apply requirement. (#61) (#1499)
* Make policy checks its own apply requirement. (#61)

* Remove warning from docs.
2021-04-13 12:46:47 -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
Sarvar Muminov
ad76385c76 Global atlantis lock new release branch (#1473)
* Orca 679 global atlantis lock new release branch (#49)

* Adding CommandLocker to boltDB and exposing it through locker interface

* Apply lock ui and apply command lock controller

* Minor comments

* Adding more tests and refactorinng

* Linting fixes

* creating applyLockingClient variable to fix interface error

* nullsink for stats

* Addressing PR comments

* fixing e2e tests

* linting fix fml

* Update outdated function descriptions

Address PR comments

* revert stats sink changes

* remove unnecessary dependencies
2021-04-01 15:40:29 -07:00
Mathieu Cantin
71a5dec88d Remove refreshing state 3e (#1433)
* fix(output): Remove Refreshing state... from output

Since Terraform 0.14.0 there are no separator between refreshing plan and the plan.
2021-03-10 12:18:10 -08:00