Commit Graph

2964 Commits

Author SHA1 Message Date
jskrill
00aae565b2 feat: add autodiscover enabled feature (#3895)
* add flag to allow the user disable the autodiscover

* add global config and doc

* feat: Implement autodiscover.mode

* fix: Minor doc fixes

* fix: Small fixes to docs/indent/tests

* fix: Line length, quoting, function comments

* fix: Add a few more tests and remove newlines

* fix: Always camel case never snake

---------

Co-authored-by: Marcelo Medeiros <m.medeiros@carepay.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-29 15:43:53 -08:00
renovate[bot]
6ff0e2f90e chore(deps): update dependency @vuepress/plugin-google-analytics to v2.0.0-rc.0 in package.json (#3986)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-17 00:57:11 +00:00
Alexandru Marcencov
e9d89bb830 add script execution from docker-entrypoint.d folder (#3666)
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-16 11:30:14 -08:00
renovate[bot]
488a1ac92e chore(deps): update dependency hashicorp/terraform to v1.6.4 in .circleci/config.yml (#3981)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-16 01:53:34 +00:00
Eng Zer Jun
fd600d3bb1 perf: avoid allocations with (*regexp.Regexp).MatchString (#3881)
We should use `(*regexp.Regexp).MatchString` instead of
`(*regexp.Regexp).Match([]byte(...))` when matching string to avoid
unnecessary `[]byte` conversions and reduce allocations.

Example benchmark:

func BenchmarkMatch(b *testing.B) {
	for i := 0; i < b.N; i++ {
		if match := branchRegex.Match([]byte("main")); !match {
			b.Fail()
		}
	}
}

func BenchmarkMatchString(b *testing.B) {
	for i := 0; i < b.N; i++ {
		if match := branchRegex.MatchString("main"); !match {
			b.Fail()
		}
	}
}

goos: linux
goarch: amd64
pkg: github.com/runatlantis/atlantis/server/core/config
cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics
BenchmarkMatch-16          	 8269699	       141.4 ns/op	       4 B/op	       1 allocs/op
BenchmarkMatchString-16    	14298446	        95.81 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/runatlantis/atlantis/server/core/config	2.784s

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-15 09:00:00 -08:00
Marcos Diez
57fdc5a641 feat: full window sized terminal (#3781)
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-14 23:03:23 -08:00
Henry Muru Paenga
ce2b99223a fix: Check user permissions on autoplan (#3742)
* Check user permissions on autoplan

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-14 22:21:11 -08:00
Felipe Zipitría
896c394988 fix: remove unused packages after gosu cleanup (#3975)
Signed-off-by: Felipe Zipitria <fzipitria@life360.com>
Co-authored-by: Felipe Zipitria <fzipitria@life360.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-14 21:17:31 -08:00
Luke Massa
99035ce7ac Remove deprecated repo whitelist flag (#3922) 2023-11-14 15:41:49 -08:00
renovate[bot]
8532bc3208 fix(deps): update module github.com/xanzy/go-gitlab to v0.94.0 in go.mod (#3978)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-14 00:56:03 +00:00
renovate[bot]
a793620475 fix(deps): update module golang.org/x/text to v0.14.0 in go.mod (#3972)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-11 02:47:59 +00:00
renovate[bot]
46c1d757f8 chore(deps): update dependency @vuepress/plugin-google-analytics to v2.0.0-beta.68 in package.json (#3971)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-11 02:41:40 +00:00
renovate[bot]
8ebb504528 fix(deps): update module golang.org/x/term to v0.14.0 in go.mod (#3968)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-10 03:33:35 +00:00
renovate[bot]
543c37ce51 fix(deps): update module github.com/golang-jwt/jwt/v5 to v5.1.0 in go.mod (#3967)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-10 01:52:00 +00:00
Luke Massa
9bc94dee14 feat: remove silence whitelist errors flag (#3923)
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-09 14:36:35 -08:00
Dylan Page
ea1dbbdabb fix: actually run GHA workflows on s/releases/release branches (#3966) 2023-11-09 14:13:01 -06:00
Bruno Schaatsbergen
e9c0d72578 fix: use the non-root atlantis user instead of root (#3886)
* feat: use Atlantis user by default and get rid of gosu

* chore: set `DOCKER_CONTENT_TRUST=1`

* chore: fix chmod and chown

* feat: add a healthcheck to the debian and alpine images

* feat: removing setuid and setgid permissions prevents container privilege escalation and improve comments

* chore: remove setgid/setuid as we chown an entire directory

* chore: keep deps comment generic

* chore: grammar

* chore: remove redundant comment

* chore: rm DOCKER_CONTENT_TRUST

* chore: set uid and gid and remove passwd entry

* chore: revert gid and uid set as it's conflicting

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-08 20:25:08 -08:00
renovate[bot]
b965f9ac1a chore(deps): update golang docker tag to v1.21.4 in testing/dockerfile (#3963)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-09 04:23:21 +00:00
renovate[bot]
1a9714a91c fix(deps): update github.com/warrensbox/terraform-switcher digest to d7dfd1b in go.mod (#3928)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-07 00:47:57 +00:00
Dylan Page
5818334a9a fix(renovate): add release branches to renovate (#3924)
* fix(renovate): This fixes renovate to also autoMerge fixes to our release branches so we don't have to cherry-pick them.

* fix(renovate): run config validator on release branches too
2023-11-05 20:20:15 -08:00
renovate[bot]
1f2f3531e5 fix(deps): update module github.com/spf13/cobra to v1.8.0 in go.mod (#3927)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-06 03:07:52 +00:00
renovate[bot]
06e83e8d08 fix(deps): update module github.com/gorilla/websocket to v1.5.1 in go.mod (#3926)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-06 03:00:00 +00:00
Dylan Page
886dd96299 refactor(ci): reduce complexity in required workflows (#3925)
* refactor(ci): builds upon work in tests to reduce complexity in requiring workflows

* fix: tweaks and missing outputs

* fix: make sure the new workflows actually run

* fix: consistency with non-required testing image
2023-11-05 21:41:32 -05:00
renovate[bot]
9c6b8d0a96 fix(deps): update module github.com/gorilla/mux to v1.8.1 in go.mod (#3921)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-05 04:06:28 +00:00
renovate[bot]
721313f4d8 fix(deps): update module github.com/go-playground/validator/v10 to v10.16.0 in go.mod (#3920)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-05 01:06:35 +00:00
Simon Heather
1b45fb1ae1 fix: When GitHub/GitLab Auto-Merge Is Used with Atlantis Pre Workflow Hooks, the PR will be Merged Prematurely (#3880)
* Fix Premature Auto-Merge

* Add CommitStatusUpdater to commandRunner
2023-11-03 22:41:16 -04:00
Simon Heather
3056701c6b fix: Update GitLab Pipeline Type Detection to use Head Pipeline Property (#3887)
* Fix GitLab Mulitple Pipelines

* Add logger to tests and fix test ref

* Add retry to GetMergeRequest

* Update retries

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-03 22:22:12 -04:00
Dylan Page
1dcf234a6b chore: enable cherry-pick-bot.yml (#3918)
https://github.com/googleapis/repo-automation-bots/tree/main/packages/cherry-pick-bot#configuring
2023-11-03 22:13:19 -04:00
Rush Soni
9e6a4d7321 Update Terraform Version for Atlantis (#3914) 2023-11-02 15:40:56 -05:00
renovate[bot]
63739a8bcf chore(deps): update dependency hashicorp/terraform to v1.6.3 in .circleci/config.yml (#3910)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-02 00:32:22 +00:00
Luke Massa
8a87d2ef09 fix: Better determine number of expected comments and webhooks in e2e test (#3907)
* fix: Better determine number of expected comments and webhooks in e2e test

* Cleanup
2023-10-31 23:16:34 -07:00
renovate[bot]
f519638d1b fix(deps): update module github.com/redis/go-redis/v9 to v9.3.0 in go.mod (#3906)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-01 02:01:32 +00:00
renovate[bot]
febed33c49 fix(deps): update module github.com/google/uuid to v1.4.0 in go.mod (#3902)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-27 04:00:16 +00:00
renovate[bot]
d17665fee9 fix(deps): update module go.etcd.io/bbolt to v1.3.8 in go.mod (#3901)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-27 01:17:42 +00:00
renovate[bot]
5e1f50b073 chore(deps): update dependency node to v20.9.0 in .node-version (#3896)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-25 01:32:56 +00:00
renovate[bot]
ed73d4942b chore(deps): update actions/setup-node action to v4 in .github/workflows/website.yml (#3892)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-24 02:14:19 +00:00
renovate[bot]
a542aa8f20 fix(deps): update module github.com/xanzy/go-gitlab to v0.93.2 in go.mod (#3890)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-23 00:36:47 +00:00
snorlaX-sleeps
5f1f580a90 docs: Update the GitHub app installation instructions to include a section on manually creating a GitHub app and using it with Atlantis. Add notes on differences with the app created by Atlantis (#3882)
Signed-off-by: snorlaX-sleeps <21spock@gmail.com>

Committer: snorlaX-sleeps <21spock@gmail.com>
2023-10-20 15:26:24 -07:00
Simon Heather
edc9bd9262 feat: Improve GitHub and GitLab Debug Logging (#3876)
* Improve GitHub and GitLab Debug Logging

* Fix formatting

* Fix g.client.Repositories.Get debug message

* Update gitlab_client_test with logger

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-10-20 08:49:57 -07:00
renovate[bot]
22ab01e433 fix(deps): update module github.com/hashicorp/hcl/v2 to v2.19.1 in go.mod (#3878)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-20 01:19:08 +00:00
renovate[bot]
f34e5dbb87 chore(deps): update dependency hashicorp/terraform to v1.6.2 in .circleci/config.yml (#3872)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-19 00:25:54 +00:00
renovate[bot]
5b3f0575ca fix(deps): update module github.com/bradleyfalzon/ghinstallation/v2 to v2.8.0 in go.mod (#3871)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-18 00:41:41 +00:00
renovate[bot]
cd604c23f6 fix(deps): update module github.com/hashicorp/hcl/v2 to v2.19.0 in go.mod (#3869)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-17 01:19:14 +00:00
Rui Chen
23b373e8a6 fix: add misspell check for linting codebase (#3865)
* add misspell check

* lint: fix misspell issues

```
server/events/vcs/instrumented_client.go:46:26: `soley` is a misspelling of `solely` (misspell)
// methods and implement soley any github specific interfaces.
                         ^
server/events/project_command_context_builder.go:49:5: `Conciously` is a misspelling of `Consciously` (misspell)
	// Conciously making this global since it gets flushed periodically anyways
	   ^
server/controllers/events/gitlab_request_parser_validator.go:87:32: `noteable` is a misspelling of `notable` (misspell)
				NoteableType string `json:"noteable_type"`
				                           ^
server/controllers/events/gitlab_request_parser_validator_test.go:351:6: `noteable` is a misspelling of `notable` (misspell)
    "noteable_type": "MergeRequest",
     ^
server/controllers/events/gitlab_request_parser_validator_test.go:359:6: `noteable` is a misspelling of `notable` (misspell)
    "noteable_id": 7,
     ^
server/controllers/events/gitlab_request_parser_validator_test.go:467:6: `noteable` is a misspelling of `notable` (misspell)
    "noteable_type": "Commit",
     ^
server/controllers/events/gitlab_request_parser_validator_test.go:475:6: `noteable` is a misspelling of `notable` (misspell)
    "noteable_id": null,
     ^
server/events/event_parser_test.go:1012:23: `seperate` is a misspelling of `separate` (misspell)
	// If sha changes in seperate PR,
	                     ^
```

Signed-off-by: Rui Chen <rui@chenrui.dev>

* add locale setting

Signed-off-by: Rui Chen <rui@chenrui.dev>

* Revert "lint: fix misspell issues"

This reverts commit 7cc56afa8e.

* lint: fix some misspell issues

Signed-off-by: Rui Chen <rui@chenrui.dev>

---------

Signed-off-by: Rui Chen <rui@chenrui.dev>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-10-16 20:17:57 +00:00
Rui Chen
16c373d211 ci: add slack alerting per gotest job failed on main branch (#2975)
update condition

Signed-off-by: Rui Chen <rui@chenrui.dev>
2023-10-16 19:26:44 +00:00
Rui Chen
44d4c71409 deps: bump to use node20 (#3864)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2023-10-16 14:10:13 -04:00
renovate[bot]
c9fe0d76cd chore(deps): update dependency hashicorp/terraform to v1.6.1 in .circleci/config.yml (#3860)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-16 04:06:34 +00:00
renovate[bot]
8158de0699 fix(deps): update module github.com/alicebob/miniredis/v2 to v2.31.0 in go.mod (#3861)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-16 01:08:31 +00:00
renovate[bot]
c11873eee1 chore(deps): update debian docker tag to v12.2 in dockerfile (#3859)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-15 01:11:34 +00:00
renovate[bot]
10289c6eef chore(deps): update dependency node to v18.18.2 in .node-version (#3857)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-14 02:06:19 +00:00