Commit Graph

49 Commits

Author SHA1 Message Date
Nish Krishnan
8598c37671 Support pre-workflow hooks on all comment/auto triggered commands. (#43) (#1418)
Fixes pre-workflow-hooks not logging errors #1371
Prevents pre-workflow-hook from locking and cloning the dir if there are no hooks registered. #1342
2021-02-22 08:34:26 -08:00
Sarvar Muminov
3456dc934b Add pre workflow custom hooks to run scripts before workflow execution(plan, apply, etc) (#1255)
* Updated runatlantis.io/docs to have `pre-workflow-hooks` use cases and examples
2020-12-14 15:19:52 -05:00
Gerald Barker
d2610a78af Add Option to globally disable apply (#1230)
* Add Option to globally disable apply

Co-authored-by: Gerald Barker <geraldbarker@mail.com>
2020-10-27 21:01:39 -07:00
Luke Kysow
8ac19e4017 Deprecate --repo-whitelist for --repo-allowlist 2020-07-25 23:50:09 -07:00
Chris Alexander
aa1bfc0a27 Add "plan" to continued statement 2020-07-01 10:11:33 -05:00
David McPike
3da442d053 Fixes #946 2020-03-21 13:10:04 -05:00
Luke Kysow
3919f05548 Update to latest version of go-gitlab 2019-08-26 18:23:52 +02:00
Luke Kysow
d0308a52e7 Redact clone url during clone errors.
If there was an error during cloning, we would sometimes print the clone
credentials to the pull request and in the Atlantis logs. This change
ensures we print the redacted clone url.

We also change the redacted clone url to contain "username:<redacted>"
so that if users see the redacted url in logs, they'll know we were
using a credentialed form and so if they try to replicate with curl
they'll know to substitute the correct credentials.
2019-05-07 09:14:59 -04:00
Luke Kysow
8982a67b78 Run latest goimports 2019-03-30 20:22:49 -05:00
Luke Kysow
d78b106cab Refactor @jjulien's server-side config work. 2019-03-27 14:47:48 -05:00
John Julien
1fcdaba719 Added new --repo-config option and deprecated --allow-repo-config
This enables atlantis.yaml in all repos, but by default restricts
certain sensitive keys from being used.

The keys apply_requirements, workflow, and workflows can only be
specified in an atlantis.yaml file if explicitly allowed by a
server side repo config.

The repo config file provides the ability to specify a default set of
workflows, and default values for apply_requirements and workflow to use
use on a per repo basis.  It also supports applying to a collection of
repos by using regex to match a repo name.

If more than one repo name matches, the values from last repo matched
are used.

This deprecates the --allow-repo-config option
2019-03-27 14:47:48 -05:00
Luke Kysow
2fb8f4d4ff Support bitbucket server pr:deleted event
If a pull request is deleted, Atlantis should delete the locks.
Fixes #498
2019-03-01 11:36:22 -05:00
Luke Kysow
1997e112d3 Remove duplicate vcs proxy interface
This is the same interface as vcs.Client so no need to have both.
2019-02-25 16:51:26 -05:00
Luke Kysow
985c30c097 Don't parse gitlab comment events when on commit
Detect if the GitLab event is a comment on a commit instead of a merge
request and log a debug message that we don't support this.

Previously, Atlantis would panic if it received this event.
2018-12-14 12:04:19 -06:00
Luke Kysow
b6d821326d Update docs about mergeability 2018-12-12 14:26:46 -06:00
Luke Kysow
3c1e1ab6e3 Update gitlab lib. Fix breakages. 2018-12-12 12:41:33 -06:00
Matt McFarland
05a0b09402 Remove unneccessary NewRepo call in tests 2018-10-16 12:47:26 -05:00
Matt McFarland
901cc0aa20 Update per requested changes, fix typos in test comments 2018-10-16 12:43:13 -05:00
Matt McFarland
23b56238b1 Add initial implementation of --silence-whitelist-errors server flag 2018-10-11 15:25:24 -05:00
Luke Kysow
af419ef3e1 Fix gometalint errors 2018-09-07 10:54:48 -07:00
Luke Kysow
e9b7001266 Add godocs. Refactor ProjectResult. Golint errors. 2018-08-30 16:47:17 -06:00
Luke Kysow
33926a01f2 WebHook -> Webhook 2018-07-24 20:24:27 +02:00
Luke Kysow
e2930e48e5 Test bitbucket parsing 2018-07-20 13:27:25 +02:00
Luke Kysow
1fc4667c63 WIP bitbucket 2018-07-19 21:52:33 +02:00
Luke Kysow
d3ec832eff WIP 2018-06-21 18:18:54 +01:00
Luke Kysow
d359131a29 RepoWhitelist -> RepoWhitelistChecker 2018-06-20 15:20:10 +01:00
Luke Kysow
0c966d50e9 GitlabRequestParser -> GitlabRequestParserValidator 2018-06-20 15:11:44 +01:00
Luke Kysow
8ab4857f77 Fix all tests 2018-06-15 16:16:31 +01:00
Luke Kysow
143fb82bd2 Use new mux.SetURLVars function for testing. 2018-05-30 18:48:12 +02:00
Luke Kysow
f21cf09417 Refactor to use VCS Host in Repo model. 2018-03-27 12:43:20 -07:00
Luke Kysow
8aca81966f Add Apache 2 license and copyright.
Add Apache 2 license and Hootsuite copyright to all golang
files. Add a disclaimer that the files have been modified
hereafter by contributors to this repo in order to abide
by the Apache 2 license requirements.
2018-03-15 17:25:02 -07:00
Luke Kysow
32e0b4003e Small refactor to events_controller. Final tests. 2018-03-11 13:30:01 -07:00
Luke Kysow
c9a9c2deb3 Update README. Fix gometalint errors. 2018-03-08 22:40:00 -08:00
Luke Kysow
31dc84853a [Draft] Add --repo-whitelist option.
- this option is now required which breaks BC
- will validate that an event is coming from a repo that we trust
- started refactoring event_controller tests to use less mocks
2018-03-08 17:49:47 -08:00
Luke Kysow
a24d940f5d Rename DetermineCommand to Parse 2018-02-28 11:04:28 -08:00
Luke Kysow
a09ad79405 Refactor comment parsing into own class. 2018-02-28 10:42:21 -08:00
Luke Kysow
ab1d36d2c8 Comment back on pull request sooner on error.
- Refactor EventParser so it returns a comment we can send to the pull
request when a bad command or help command is commented.
- Remove now unneeded HelpExecutor because we comment right from the
EventsController now
- Use pflag package to parse commands instead of doing it manually
- Comment back when user types terraform instead of atlantis
2018-02-27 17:45:05 -08:00
Luke Kysow
6c159feff4 Rename to runatlantis from atlantisnorth. 2018-02-18 21:28:18 -08:00
Luke Kysow
0299d3ee12 Move to new atlantisnorth repo 2018-02-06 13:29:36 -08:00
Luke Kysow
acdf771ce7 Switch to newest pegomock library (#205) 2017-11-19 22:41:43 -08:00
Luke Kysow
fa43febf60 Gitlab (#190)
Gitlab initial implementation
2017-11-16 13:22:28 -08:00
Luke Kysow
3528ce60ca Fix gometalint errors 2017-11-01 07:43:55 -07:00
Luke Kysow
65a07590de Test server 2017-11-01 07:41:37 -07:00
Luke Kysow
73d04fb89a Add gometalint. Fix errors (#176) 2017-10-31 20:07:41 -07:00
Luke Kysow
e8ba765e56 Refactor pull closed test 2017-10-18 08:22:06 -07:00
Luke Kysow
1caaaa03f7 Test pull request closed handling 2017-10-18 07:55:23 -07:00
Luke Kysow
aadd9ce367 Test EventsController Post() 2017-10-18 07:36:43 -07:00
Luke Kysow
fa047c5435 Refactor EventParser to not take reference to ctx 2017-10-18 06:44:44 -07:00
Luke Kysow
75a71a9bbf Extract GHRequestValidator 2017-10-18 06:44:44 -07:00