Commit Graph

996 Commits

Author SHA1 Message Date
Tom Baker
a791fbfff6 feat: Add username to main lock screen (#3597)
* Add username to lock screen
2023-07-17 16:18:52 +00:00
Ross Strickland
1c232b5f90 fix: broken automerge logic (#3591)
* fix automerge logic.

* address failing autoplan test with automerge
2023-07-10 13:23:16 -04:00
Almenon
78632beb20 fix(bitbucket): avoid extra plans using a local LRU (#3402) 2023-07-07 18:35:22 -04:00
Simon Heather
b8994190be feat: Add Support for Customising the Shell for Pre and Post Workflow Hooks (#3451) 2023-07-07 18:34:01 -04:00
Ross Strickland
76c482b83a feat: global repo params (#3379) 2023-07-07 18:33:21 -04:00
Simon Heather
847cab74c4 feat: Add Command Name Environment Variable to Pre/Post Workflow Executions (#3571)
* Add Workflow Command Name env var

* Update tests

* Update command runner

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-07-07 16:21:32 -04:00
Simon Heather
91593b647b fix: Discarding a Plan Causes the Whole Working Directory to be Deleted (#3553) 2023-07-07 11:12:06 -04:00
Simon Heather
79a42ee90c Plan Discarded Fix (#3550) 2023-07-07 10:26:22 -04:00
Andre Ziviani
b6466bdfd2 fix: Tests broken by #3503 (#3583) 2023-07-06 22:22:47 +00:00
Andre Ziviani
974eed3803 feat: Disable policy check on some repositories (#3503)
* feat: Allow enabling policy check per repository

* chore: Tests

* chore: Docs

* chore: Improve tests

* chore: E2E tests
2023-07-06 16:39:36 -04:00
Simon Heather
fce28ebceb fix: Atlantis Triggers AutoPlans on Non-Code Change GitLab Merge Event Webhooks (#3567)
* Gitlab merge event fix

* Update events controller tests

* Update eventrsController formatting

* Update events controller test formatting

* Revert gitlab_request_parser_validator

* Update event_parser

* Update tests

* Add new testdata

* Add testdata EOF LF

* Update gitlab-merge-request-event-update-reviewer.json

* Update gitlab-merge-request-event-update-milestone.json
2023-07-06 12:57:32 -07:00
Simon Heather
8552607c2b Web Console Scrollbar Fix (#3574)
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-07-05 21:33:14 +00:00
Simon Heather
0d1f87810d fix: Gitlab Autoplan wont trigger when switching Draft to Ready (#3568)
* Fix: Gitlab Autoplan wont trigger when switching Draft to Ready

* Update gitlab-merge-request-event-mark-as-ready.json

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-07-05 12:56:21 -07:00
Yunchi Luo
a6161c9926 feat: Add an output option to filter output for custom run steps (#3518)
* feat: Add an `output` option to filter output for custom run steps
2023-06-30 10:00:31 -04:00
Simon Heather
c6801990db feat: update the lock detail web page to use a modern grid layout (#3552)
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-06-27 23:14:38 -04:00
Ken Kaizu
3954955e13 fix(deps): update module github.com/petergtz/pegomock/v3 to v4 (#3534)
* fix(deps): update module github.com/petergtz/pegomock/v3 to v4 in go.mod

* remove pegomock generate m option, which is not support after v4

* make regen-mocks

* replace pegomock v4 primitive eq/matchers

* convert pegomock v4 Eq/Any matchers

* remove custom models.Repo matcher

* pegomock v4 cannot use result method args

ref https://github.com/petergtz/pegomock/issues/123

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-20 15:05:23 -04:00
Ross Strickland
7545296741 fix: parse custom run step output in policy_check (#3502)
* parse custom run output in policy_check

* error if no conftest output

* e2e test

* Adding other policy template.

* update markdown renderer test
2023-06-20 14:55:37 -04:00
Simon Heather
556de93300 Gitlab Hide Previous Comments (#3476) 2023-06-13 21:03:36 -05:00
nitrocode
e505817a7d chore(deps): bump pegomock v3.0.1 (#3515) 2023-06-13 11:36:09 -07:00
Simon Heather
86607d8aeb feat: Add GitLab Reaction Emojis on MR Comments (#3456)
* Add GitLab Reaction Emoji

* Update docs

* update docs

* Update event_parser_test
2023-06-12 22:27:42 -05:00
Simon Heather
c5d03edd1a feat: Update Lock Index Page to Use a CSS Grid Layout (#3509)
* Update Lock Index Page to Use a CSS Grid Layout

* Update styles

* Modify css
2023-06-11 22:45:13 -05:00
Simon Heather
7fa9b9c925 fix: Remove the 'Plan Discarded' Message from the Enable/Disable Apply Commands (#3511)
* Remove `/?discard=true`

* Restore forward slash
2023-06-11 09:01:08 -05:00
Simon Heather
fa6a77a6ea Add xterm-addon-search-bar (#3507) 2023-06-11 01:22:09 -05:00
Simon Heather
504d1b7fe3 Replace bindata-assetfs with embed (#3504)
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
2023-06-10 19:04:10 -05:00
Leandro López
c709fd0cff feat: Add Terraform command duration to log messages (#3484)
* Log duration of Terraform commands

Closes #3413.

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>

* Make log message casing consistent

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>

* Add tests for passing duration to Terraform comamnds logs

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>

* Add logging mocks for testing Terraform client

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>

---------

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
2023-06-09 21:03:36 -05:00
nitrocode
79500182db chore(deps): bump tally to v4 (#3498) 2023-06-08 21:57:46 -04:00
renovate[bot]
1d91dfb083 fix(deps): update module github.com/google/go-github/v52 to v53 in go.mod (#3495)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-07 03:41:38 +00:00
Finn Arne Gangstad
d1c6851899 fix: Check for upstream changes to merge only when planning (#3493)
* whitespace fixes

* Only re-clone on upstream updates just before planning

When using the merge checkout strategy, we would peviously
re-clone on upstream updates on any call to Clone(), for example
when running workflow hooks or runing import commands.

If we had already ran a plan, and master was updated, this
would delete the plan and apply would not have anything to
apply.

Modified to only re-clone on upstream updates in doPlan()

* Apply suggestions from code review

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
2023-06-06 23:39:07 +00:00
Leandro López
339c0fe474 feat(stats): pass plan stats to markdown templates (#3478)
* Capture stats in plan changes regexp

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>

* Add PlanSuccessStats model to hold plan stats

This will be useful to pass down to the templates to include
additional information when formatting the messages emitted by Atlantis.

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>

* Return stats for a PlanSuccess

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>

* Add plan success stats to template data

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>

* Refactor plan success template data creation

DRY. Also highlights a bug where the stats should be a field in
planSuccessData in order to be accessible from the templates.

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>

* Move plan stats to planSuccessData struct

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>

---------

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
2023-06-03 14:01:17 -05:00
Ross Strickland
ad75aace78 fix: Initialize VCSClient for commandrunner to remove recent server panics (#3461)
* Initialize VCSClient for commandrunner.

* Add test.
2023-05-30 14:32:37 -04:00
Simon Heather
50b1e48b4a fix(workflow-hook): multiline output formatting (#3425)
* Fix Workflow Hool Scripts Multiline Output

* Update unit tests

* revert bash cmd

* Fix tests
2023-05-30 09:21:56 -05:00
Simon Heather
998eb63821 fix(workflows): Workflow hook output id fix (#3454) 2023-05-26 08:50:52 -05:00
Alberto Rojas
4a7fc33857 fixbug: Update commandName in RunAndEmitStats (#3437) 2023-05-23 20:04:30 -05:00
Simon Heather
4915d8db5e fix(workflow-hook): log output with or without errors (#3422)
* fix: Errors in Pre or Post Workflow Hook Scripts do not Produce any Output

* Fix post workflow

* Update unit tests
2023-05-23 17:12:28 -05:00
Alberto Rojas
96cf38835e metrics: Fix Add missing project and command scopes to ProjectCommandRunner (#3416)
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
2023-05-22 07:48:31 -05:00
oysteingraendsen
4e867fc36e feat: when using order group, abort plan/apply if any fail (#3323)
* feat: when using order group, abort plan/apply if any fail

* feat: add 'abort_on_execution_order_fail' flag on repo level

* feat: use runProjectCmdsParallelGroups in version_command_runner

* chore: add plan tests

---------

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
2023-05-12 13:24:33 -04:00
Marcus Ramberg
4ed44d906c feat(reaction): disable reactions by setting an empty string (#3360)
* fix: Previous implementation tried to do comment parsing inside github, and only worked for 'atlantis' command.

This commit improves on that to make it possible to implement reactions in other VCS providers and also reuse the existing comment parsing.

* test: Add negative test to confirm reactions are not added for invalid comments

* test: Add a negative test to confirm invalid commands do not get a reaction
2023-05-05 23:00:25 -05:00
renovate[bot]
19010fd4ee fix(deps): update module github.com/golang-jwt/jwt/v4 to v5 in go.mod (#3366)
* fix(deps): update module github.com/golang-jwt/jwt/v4 to v5 in go.mod

* Bump jwt

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
2023-05-05 16:53:23 +00:00
Xavi Mabras
9295fabb9f feat: case insensitive pr comments (#3361)
* Basic case insensitive for pr comments.

* Add test for uppercase/lowercase case.

* Merge test functions that check similar behaviors.

---------

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-05-04 07:33:47 -05:00
Ross Strickland
434bab5c70 [Feature] - Add clear policy approval functionality. (#3351)
* Add clear policy approval functionality.

* Fix param name, update doc.

* fix test, add e2e test

* empty commit to re-trigger tests.

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-05-02 11:02:04 -04:00
renovate[bot]
cc2d0c16e3 fix(deps): update module github.com/google/go-github/v51 to v52 in go.mod (#3346)
* fix(deps): update module github.com/google/go-github/v51 to v52 in go.mod

* Update fixtures.go

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
2023-04-30 03:07:33 +00:00
Marcus Ramberg
f8b293ada0 feat: Github reaction emojis on PR comments (#2706)
* feat: Basic implementation of github reactions on PRs

Adds eyes whenever it detects an `atlantis` command.

* feat: Make the emoji reaction configurable

* tests: Add a mocked test for EmojiReaction being called in github

* ci: Disable revive linter for stubs
2023-04-25 17:22:51 -04:00
Shouichi Kamiya
f4fa3138d7 feat: add PULL_URL to environment variables (#3302)
Background:

It is convenient to have the PR URL available so that we can link the PR
that triggers the infrastructure changes from the audit logging system.
For example, the google cloud provider adds user-supplied justification
into google cloud audit logging via `CLOUDSDK_CORE_REQUEST_REASON`
environment variable.

https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#request_reason
2023-04-21 02:21:27 +00:00
Ross Strickland
684f2fa7e0 feat(policies): Add granular policy_sets (#3086)
* Initial work.

* Periodic push.

* Fmt and start adding args to approve_policies cmd.

* keep funcs for now.

* Periodic push.

* Periodic push.

* fmt.

* Move approve policies logic to project_command_runner.

* update some tests

* More test fixes.

* update more tests. fix som logic.

* more tests. add additional info to common data for custom templates.

* fix apply with policies bug. update more tests/fmt

* file perms

* fix error parsing for conftest results.

* Update more tests and linting.

* update documentation.

* Address no-fail case. Address comments.

* Forgot changes.

* fix markdown renderer

* Fix policy fail logic. remove uneeded tmpl var

* targeted policy approvals fix

* Address PR comments.

* empty commit to trigger build

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Co-authored-by: rkstrickland <ross.strickland@instacart.com>
Co-authored-by: Dylan Page <dylan.page@autodesk.com>
2023-04-20 21:53:46 -04:00
Dylan Page
34ad9e901d fix: revert branch protection feature causing breaking change
Reverts "fix(github): branch protection not supported (#3276)"
Reverts "fix: allow Require Linear History when selecting merge method (#3211)"
Closes #3320
2023-04-11 16:48:39 -04:00
renovate[bot]
763f017169 fix(deps): update module github.com/google/go-github/v50 to v51 in go.mod (#3316)
* fix(deps): update module github.com/google/go-github/v50 to v51 in go.mod

* Update fixtures.go

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
2023-04-11 00:36:40 -05:00
Isaac Wilson
089dc1aac8 fix(autoplan): modules for per-repo configs (#3272)
* Fix autoplan modules for per-repo configs

* Use utils package for slices.Contains
2023-04-03 06:25:01 -07:00
Isaac Wilson
8adb001aa6 fix(gitlab): Add backwards compatible mergability check (#3277)
* Add backwards compatibility for merability check in Gitlab client

* Cleanup
2023-03-30 19:31:56 -05:00
Tymofii Polekhin
ebc06c19c6 fix(github): branch protection not supported (#3276)
* fix: github branch protection not supported

* fix: typo protectionAvailable
2023-03-30 11:32:59 -05:00
Oliver
f35f4d6775 feat: Flag to disable custom [Atlantis] commit messages on PR merge (#3120)
* Modify the automere commit message to include the PR number [DEVOPS-674]

* Update server/events/vcs/common/common.go

Co-authored-by: Ken Kaizu <k.kaizu38@gmail.com>

* added test for PR message func [DEVOPS-674]

---------

Co-authored-by: Ken Kaizu <k.kaizu38@gmail.com>
2023-03-25 02:07:19 +00:00