Test User
e5ea28d897
test: update test expectations to match fixed error messages
2025-06-27 12:34:55 -07:00
PePe Amengual
02ffb41cd6
fix: resolve remaining staticcheck linting issues
...
- Remove newline characters from error messages in step.go
- Change capitalized error messages to lowercase in multienv_step_runner.go and github_client.go
2025-06-27 12:22:14 -07:00
PePe Amengual
d13bb002b3
fix: resolve test failures after golangci-lint updates
...
- Fix terraform lock file checksum verification by updating with correct checksums for null provider v3.2.4
- Fix GitLab request parser validation errors by removing nolint comments from JSON test data
- Fix step validation error messages by adding missing newlines
- Fix MultiEnv step runner error messages by capitalizing 'Invalid'
- Fix GitHub client merge method error messages by capitalizing 'Merge method' and 'Specify'
All tests now pass successfully.
2025-06-27 12:11:55 -07:00
PePe Amengual
03467ec811
fix: address all remaining golangci-lint staticcheck issues (ReplaceAll, error strings, empty branches)
2025-06-27 11:58:40 -07:00
PePe Amengual
392d5165a9
fix: resolve all linter issues for golangci-lint v1.54+
...
- Replace all strings.Replace with strings.ReplaceAll
- Fix all De Morgan's law and tagged switch issues
- Remove empty branches, clarify comments
- Fix error string capitalization and punctuation
- Use assert.Len for testifylint
- Remove embedded field selector warnings
This should allow golangci-lint to pass cleanly on the renovate branch.
2025-06-27 11:27:55 -07:00
PePe Amengual
7567b31ccd
fix: resolve linter issues to enable golangci-lint update
...
- Fix all errcheck issues (unhandled errors for Close(), Fprintln, etc.)
- Fix gosec issues with appropriate nolint comments for test code
- Fix misspell issues and add nolint for GitLab API field names
- Fix revive issues (dot-imports in tests, missing package comments)
- Fix staticcheck and testifylint issues
- Add package comments where required by linter
This enables updating golangci-lint-action from v6 to v8 in the workflow.
2025-06-27 11:12:19 -07:00
Hirotake Kobayashi
5dfe5f92a9
fix: Set Env variables when output: hide in multienv ( #5319 )
...
Signed-off-by: Hirotake Kobayashi <h.kobayashi@raksul.com >
Co-authored-by: PePe Amengual <2208324+jamengual@users.noreply.github.com >
2025-05-23 22:57:11 -07:00
Simon Heather
4bea4e934a
chore: Add Struct required tags and Server Struct Validator ( #5371 )
...
Signed-off-by: X-Guardian <32168619+X-Guardian@users.noreply.github.com >
2025-03-09 11:34:48 +00:00
Luke Massa
cf0b3f3295
chore: Add nil checks before returning wrapped error ( #5309 )
...
Signed-off-by: Luke Massa <lukefrederickmassa@gmail.com >
2025-02-11 00:10:58 -05:00
Alexey Kosenko
1f9b90e715
feat(post-workflow-hook): pass the result status of executed command to the post hook envs ( #5308 )
...
Signed-off-by: a1k0u <alko7enko@gmail.com >
2025-02-10 21:27:30 +00:00
Luke Massa
aa4a98032e
chore: Remove dependency on multierror ( #5275 )
...
Signed-off-by: Luke Massa <lukefrederickmassa@gmail.com >
2025-02-02 12:44:39 -05:00
Eka Cahya Pratama
e2eacdcd34
fix: Return correct status when using custom policy ( #5156 )
...
Signed-off-by: bakuljajan <eka.pratama@finaccel.co >
2025-01-25 17:30:38 +00:00
Andrew Borg
9e0f3d1bb5
feat: Support project-level Terraform distribution selection ( #5167 )
...
Signed-off-by: Andrew Borg <andrew.b.borg@gmail.com >
Co-authored-by: PePe Amengual <2208324+jamengual@users.noreply.github.com >
Co-authored-by: Simon Heather <32168619+X-Guardian@users.noreply.github.com >
2025-01-02 21:06:01 -08:00
Rui Chen
591931a81c
chore: fix typos ( #5202 )
...
Signed-off-by: Rui Chen <rui@chenrui.dev >
2024-12-28 17:50:53 -05:00
Simon Heather
e468a23e0b
feat: Refine the Atlantis Info Message Logging ( #5034 )
...
Signed-off-by: Simon Heather <32168619+X-Guardian@users.noreply.github.com >
2024-11-19 12:54:55 -05:00
Takahiro Suzuki
5e0f854cea
chore: Regenerates mock files with pegomock v4.1.0 ( #5090 )
...
Signed-off-by: tkasuz <63289889+tkasuz@users.noreply.github.com >
2024-11-16 15:00:42 +00:00
Andrej Svenke
8285a0faf2
feat: set the shell for workflow command steps ( #5024 )
...
Signed-off-by: anryko <andrej.svenke@deliveryhero.com >
2024-11-04 18:29:47 +00:00
Henry Muru Paenga
9c7e5fcac8
feat: OpenTofu support ( #4499 )
...
Co-authored-by: PePe Amengual <2208324+jamengual@users.noreply.github.com >
2024-09-29 18:13:20 -07:00
Nick King
9a0c648748
feat: add ability to delegate authorization to external sources ( #4864 )
2024-09-03 15:39:04 -07:00
Rui Chen
8dccb2beb4
chore(lint): linting the codebase ( #4668 )
...
Signed-off-by: Rui Chen <rui@chenrui.dev >
2024-06-17 11:22:30 -04:00
James Brookes
a6a3b21787
refactor: use hc-install for TF downloads + constraints ( #4494 )
...
Co-authored-by: PePe Amengual <jose.amengual@gmail.com >
2024-06-16 01:54:45 +00:00
Andrej Svenke
ded89a3e1c
feat: optionally hide multienv output ( #4422 )
...
Co-authored-by: PePe Amengual <jose.amengual@gmail.com >
Co-authored-by: Rui Chen <rui@chenrui.dev >
2024-05-29 15:27:46 -04:00
Ross Strickland
821de05ddd
fix: apply strip_refreshing to output for errors ( #4443 )
...
Co-authored-by: PePe Amengual <jose.amengual@gmail.com >
2024-05-21 16:32:20 -04:00
Rui Chen
a630646b8f
chore(deps): terraform 1.8.3, opentofu 1.7.1, conftest 0.52.0 ( #4534 )
...
Signed-off-by: Rui Chen <rui@chenrui.dev >
2024-05-14 10:38:50 -07:00
Christian Winther
f35b8c69aa
fix: os.Remove should ignore non existing errors ( #4502 )
2024-05-04 14:59:22 -05:00
Hans Arnholm
d40b762ac0
revert: regression: remote ops detection TF v1.1 ( #4169 )
...
Reverts linter change from #3690 which breaks TF v1.1 detection
2024-03-05 10:31:40 -05:00
Simon Heather
67b5740053
feat: Refine The Atlantis VCS Logging Configuration ( #4285 )
...
* Refine VCS Logging
* Remove github/gitlab client logger
* Remove fmtLogSrc from instrumented_client and format
* Add staticcheck lint exception for NewGitHubClient
* Fix tests
2024-02-26 13:07:41 -05:00
Prajith
b7a06faee1
fix: download conftest binary for correct arch ( #4089 )
...
* download conftest binary for correct arch
Signed-off-by: Prajith P <prajithpalakkuda@gmail.com >
* remove default constant
Signed-off-by: Prajith P <prajithpalakkuda@gmail.com >
---------
Signed-off-by: Prajith P <prajithpalakkuda@gmail.com >
2023-12-27 15:49:27 +00: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
Leandro López
bb18da218d
fix(multienv): allow commas and quoted values ( #3542 )
...
* Make code more Go-idiomatic
While at it makes it more readable.
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com >
* Add internal function to parse multienv step input
This new function properly deals with quotes and commas in values.
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com >
* Add regression test for multienv output with comma in values
See #2765 for an issue report.
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com >
* Use parseMultienvLine for parsing multienv steps output
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com >
* Add internal function to parse multienv step input
This new function properly deals with quotes and commas in values.
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 >
2023-10-06 12:05:19 -04:00
Finn Arne Gangstad
4a921b3d65
fix: make go-generate now creates working mocks out of the box ( #3802 )
...
* Rename arguments in mocked functions from result to res
The code generated by pegomock is broken if any of the arguments to the
mocked function are named "result", so they must be named something else.
* Regenerate all mocks with make go-generate
The mocks now work without further modification after running go-generate.
2023-10-06 11:04:34 -04:00
Brett Galkowski
22060fe5d2
feat: Add option allowing usage of custom policy check tools ( #3765 )
...
* Adding new flag everywhere relevant, implementing policy result workaround
* Fixing unit test str matching, adding custom policy conditional to step_runner
* Adding documentation steps for custom policy tools
* Refactoring ConftestOutput attribute to PolicyOutput
2023-10-06 10:57:29 -04:00
Luke Massa
6a0512a579
feat: add portability to command invocation unit tests ( #3758 )
...
* Add portability to command invocation unit tests
* Fix linting
2023-09-11 11:13:26 -04:00
Simon Heather
9aae60f1d3
Conftest Log Fix ( #3632 )
2023-07-28 19:49:38 +00: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
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
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
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
nitrocode
e505817a7d
chore(deps): bump pegomock v3.0.1 ( #3515 )
2023-06-13 11:36:09 -07: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
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
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
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
Fabiano Soares Honorato
40f4e8ca6b
fix: workflow output not sending output ( #3091 )
2023-02-18 08:26:33 -06:00
Ken Kaizu
cb0aadf571
feat: state rm ( #2880 )
...
* feat: state rm
* review feedback
* fix conflict for pegomock generation code
* adopt state command into allow-commands
* fix conflicts
* fix: state rm works on workspace
* notify import/state rm discard plan file
* fix lint
* use repeat instead warning for re-plan
* perl -pi -e 's!\* 🔁 plan file was discarded. to!🚮 A plan file was discarded. Re-plan would be required before applying.\n\n\* 🔁 To!g' server/**/*
* follow main branch
2023-01-18 22:02:18 -06:00
Ken Kaizu
ee7a5cadfb
feat: PR check status to show summary e.g. Plan: 1 to add, 0 to change, 1 to destroy ( #2983 )
...
* feat: Update plan GitHub Status summary
* feat: revert result changes for Plan and Apply functions
* docs: Add CommandResult description
* feat: change plan status without ctx.CommandResult
* ensure DefaultCommitStatusUpdater implements runtime.statusUpdater
Co-authored-by: Alberto Rojas <alberto.rojas@n26.com >
2023-01-14 15:08:56 -06:00
Ken Kaizu
c77149396a
fix: atlantis import on workspaces ( #2937 )
...
* atlantis import not works on workspace
* extract workspace_step_runner_delegate from plan_step_runner
* import step runner requires workspace delegate
2023-01-11 17:53:45 -06:00
Ken Kaizu
27b9897517
chore(build): rm pegomock experimental feature for smooth mock generation ( #2886 )
...
* disable pegomock --use-experimental-model-gen, cause random fail by segv
* make regen-mocks
* fix mock code which uses non experimental pegomock codes
2022-12-27 19:58:15 -06:00
Ken Kaizu
4e0d4ecc40
feat: atlantis import ( #2783 )
...
* feat: atlantis import
* feat: atlantis import
* regenerate mock comment builder
* remove duplicate err check
* instrumented import command runner/builder
* atlantis import subcommand accept args before hyphen
* fix link checker
* docs: review feedback
* fix atlantis import options order
* Update runatlantis.io/docs/using-atlantis.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/using-atlantis.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/using-atlantis.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/using-atlantis.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/using-atlantis.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/command-requirements.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/command-requirements.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/command-requirements.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update server/events/comment_parser.go
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update server/events/comment_parser.go
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/command-requirements.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/command-requirements.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/command-requirements.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/server-side-repo-config.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/command-requirements.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/command-requirements.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/command-requirements.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/command-requirements.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update runatlantis.io/docs/command-requirements.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update server/events/command_requirement_handler.go
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* Update server/events/command_requirement_handler_test.go
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
* fix test import usage
* fix e2e expected txt
* fix doc link
* docs: workflow import stage/step
* docs fixup
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
2022-12-22 18:37:29 -06:00