* disable pegomock --use-experimental-model-gen, cause random fail by segv
* make regen-mocks
* fix mock code which uses non experimental pegomock codes
* Move terraform version listing into Terraform client
* Add flag to disable Terraform downloads
* Fallback to exact version matching if unable to list TF versions
* Add new config option to documentation
* Fix and update tests
* Fix check-lint errors
* Change option name
* Remove obsolete commented code
* Migrate version detection logic into terraform client
* Improve consistency in new function signatures & log statements
* Test requests before calling terraform-switch, to prevent unnecessary crashes
* Fix broken tests
* Silence gosec error
* Close response body
* Add pre and post workflow hook status
* fix missing mocks
* fix pre/post workflow hooks tests
* add cmd output to file
* fix typo
* add cmd output to file on pre workflow hooks
* Add hooks output to web UI
* Remove unnecessary dependencies
* Clean the code and make tests work again
* Make lint happy
* Small fixes, create dedicated UUID generator and docs
* Add missing commentary
* Use matchers instead of mocking for tests and fix e2e tests
* Change 'OUTPUT_FILE' to 'OUTPUT_STATUS_FILE'
* Reduce SendWorkflowHook calls on hooks
* Apply suggestions from code review
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
* feat: customize atlantis.yaml file name in server side config
* Update server/events/vcs/bitbucketcloud/client.go
* Update server/events/vcs/bitbucketserver/client.go
* Update server/events/vcs/not_configured_vcs_client.go
* Update server/events/vcs/azuredevops_client.go
* docs: repo_config_file multiple atlantis servers usecase example
* docs: multiple atlantis server usage which show how to call one atlantis server
* Update runatlantis.io/docs/server-side-repo-config.md
* Apply suggestions from code review
* Update runatlantis.io/docs/server-side-repo-config.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
* Fix remote execution on Terraform Cloud after v1.1.0
* Do not check terraform version for -no-color
* Move string comparison for newer version earlier
* Update remote apply test
* disable repo locking repos.yaml and atlantis.yaml with allow override
* rename disable_repo_locking into repo_locking
* add both enable/disable repo_locking test
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
* Bump github.com/zclconf/go-cty@v1.12.1
* Bump github.com/zclconf/go-cty@v1.11.1
* Bump github.com/zclconf/go-cty@v1.12.1
* Bump testing-env to latest
* Set conftest to 0.35.0
* conftest to 0.45.0, run docker tests locally
* set gha test.yml to latest testing-env image
* Update Makefile target descs, rm sudo
* Use testing-env:2022.11.17
* Add sudo back in for gha workflow
* Set conftest to 0.35.0
* test gha: rm setup
* Rename "Version" to "Conftest" for version regex
* Use cases and language import
* Use io instead of ioutil
This commit replaces `os.MkdirTemp` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.
Prior to this commit, temporary directory created using `os.MkdirTemp`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
defer func() {
if err := os.RemoveAll(dir); err != nil {
t.Fatal(err)
}
}
is also tedious, but `t.TempDir` handles this for us nicely.
Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* Fix multienv command
Correctly handles environment variable values that themselves contain "=" (e.g. AWS session tokens)
Ensures that trailing "\n" does not get published as part of the last environment variables value.
* Correct check for empty result in multienv
Check the length of the result string instead of splitting it first and checking the length of envvars (since split always returns an array of length 1)
Co-authored-by: Marc Hildenbrand <mwhildenbrand@gmail.com>
* 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
* Update multienv_step_runner Env Var Parsing Logic
* Update multienv_step_runner.go to split only on the first = character
* Add affirmative and failing test cases
* Run gofmt
* Start threading job output to RunStepRunner
* Strip ANSI
* Fix lint
* Use waitgroup to avoid test flakiness
* Move waitgroup higher
* Add ANSI test and use strings.Builder
* Fix lint
* Use errors.Wrap per style guide
* Create ShellCommandRunner to encapsulate streaming
* WIP: shell command runner
* Update signatures to propagate error finding version
* Fix log output
* Fix error checking
* Fix accidental whitespace stripping
* Remove unused struct field
* Fix error checking in terraform client
* Add unit tests to verify command output handler was called
* Remove err from async interface
* Remove duplicative log now that shell command runner does it
* Hide output in stream for env/multienv
* Add comment explaining goroutines
* Use printf for better macOS compatibility
* Moved CommandContext and CommandResult to models (#193)
* Moved CommandContext and CommandResult to models
* move from models to command
rename CommandContext -> Context
rename CommandResult -> Result
* moved command related helpers into command package
* move ProjectCommandContext and ProjectResult to command/project package
* move project command context and project result
* revert unrelated code
* move tests
* fix left over
* fix linting
* fix tests
* remove unused import
* fix project context dependencies
* fix depenedecies
* fix typo
* Add UUID for Log Streaming Job ID (#167)
* Update log handler to close buffered channels when an operation is complete (#170)
* Add preliminary check before registering new receivers in the log handler (#173)
* Using projectOutputBuffers to check for jobID instead of receiverBuffers (#181)
* Refactor log handler (#175)
* Reverting go.mod and go.sum
* Fix lint errors
* Fix linting
The plan step has a mechanism to use the default tf version from the Terraform
client if the context does not define one, however the apply step does not have
this. This results in remote executions of apply failing with a nil pointer
dereference when it checks tfVersion in StripRefreshingFromPlanOutput. This fix
involves copying what the PlanStepRunner does and falls back to the default
version if the context's version is nil.
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>