Commit Graph

29 Commits

Author SHA1 Message Date
Jay Wallace
6f583aae62 fixed preapply commands and added postapply/postplan (#102)
* fixed preapply commands and added postapply

* removed duplicate code and pass in stage name. Added post_plan. Updated docs
2017-08-10 10:02:44 -07:00
Luke Kysow
433f8875c3 Make bootstrap re-runnable. README edits 2017-08-01 22:37:20 -07:00
Anubhav Mishra
31a48e24c1 Use environment variables for terraform init, env new and env select (#85) 2017-07-18 19:12:23 -07:00
Anubhav Mishra
efd43f3492 Run terraform init and env select and new with version (#82)
* Run terraform init and env select and new with version

* Removing RunCommand now using RunCommandWithVersion
2017-07-18 11:29:28 -07:00
Luke Kysow
6ce0bba798 Pass in session to be assumed each time 2017-07-18 09:07:21 -07:00
Luke Kysow
23d6b0cbd6 Write docs for packages 2017-07-09 18:18:36 -07:00
Luke Kysow
bc0962e267 Apply logging 2017-07-09 00:54:13 -07:00
Luke Kysow
32ee883edc Plan logging 2017-07-09 00:41:37 -07:00
Luke Kysow
7747bc54ed Allow atlantis to be called by the name of the api user 2017-07-08 13:34:23 -07:00
Luke Kysow
a6b265d31f Fix unnecessary github client arg 2017-07-02 18:15:16 -07:00
Luke Kysow
b76df168cd Delete old templates 2017-07-02 18:15:15 -07:00
Luke Kysow
707cbc71a4 Redo templates 2017-07-02 18:15:15 -07:00
Luke Kysow
66f3d27c38 Packages (#67)
* Delete middleware package, move aws to new package
* Refactor github_client into github package
* Move terraform_client to its own package
2017-07-02 14:20:30 -07:00
Luke Kysow
ac83457c36 Fork workflows (#64)
* Name LockURL route

* Support pull requests from forks
2017-07-01 18:40:43 -07:00
Luke Kysow
5ea4ccd1b2 Remove sshKey hack. Use go-homedir (#63)
* Remove sshKey hack. Use go-homedir

* Add go-homedir lib
2017-07-01 18:03:51 -07:00
Luke Kysow
6dfe20757e Only store plans locally. Keep them in workspace (#60)
* Only store plans locally. Keep them in workspace
2017-07-01 16:50:38 -07:00
Luke Kysow
8fbe662185 Return error if workspace doesn't exist (#61)
* Return error if workspace doesn't exist
* Default data dir to ~/.atlantis. Don't clean workspaces
* Run goimports
2017-07-01 16:17:22 -07:00
Luke Kysow
0daacbd29a Reject concurrent runs and comment back on PR (#51)
* Reject concurrent runs and comment back on PR
2017-07-01 14:58:58 -07:00
Anubhav Mishra
9ff948cb55 Project config (#56)
* first incomplete draft for project config and pre run refactor

* adding prerun and terraform 0.9 and above support

* partial review

* Changes from pull review. Fix approvals

* more clean up and refactor of terraform init and environment commands to support terraform 0.9.0 and above

* making apply similar to plan for appending extra arguments

* review

* missed apply executor changes and fixing tests
2017-07-01 14:51:50 -07:00
Luke Kysow
57e18399d7 Delete plan on successful apply (#46)
* Return locks when they're deleted

* Implement DeletePlan and DeletePlanByPull

* Clean up data from pull request on close

* Delete plan on successful apply
2017-06-25 10:11:51 -07:00
Anubhav Mishra
d91251483a Merge pull request #42 from hootsuite/locking
Include more data with locks like pull link and user
2017-06-22 22:36:56 -07:00
Luke Kysow
d50d897274 Refactor status (#41)
* Refactor status into its own struct
* Run gofmt
2017-06-21 09:47:36 -07:00
Luke Kysow
f7d088f581 Include more data with locks like pull link and user 2017-06-20 23:36:38 -07:00
Luke Kysow
df51206aa0 Extract duplication around errors. Make updating status more consistent (#38) 2017-06-20 18:59:36 -07:00
Luke Kysow
906033e99e Implement local plan storage. Refactor S3 storage (#33)
* added new flags `plan-backend`, `plan-s3-bucket`, `plan-s3-prefix` and deleted `s3-bucket`
* interface `plan.Backend` that is implemented by `file` and `s3`
* simplified s3 code
* didn't end up following my suggestions in #30 since storing stuff in metadata requires you to `Get` the object *first* and then use the metadata. By parsing the `Key` to get repo, pull, path, and env, it skips an initial `Get` step, and I can download directly to the correct directory
* allow users to specify `application/json` or `application/x-www-form-urlencoded` for the webhook delivery type
* remove sending of special header for pull request api (fixes #11)

Closes #30 and #17 and #11
2017-06-20 00:22:42 -07:00
Luke Kysow
55c16a64cc Move ExecutionPath into apply_executor 2017-06-17 14:42:40 -07:00
Luke Kysow
d425de95fa Refactoring
* set version in one place
* rename ExecutionContext to CommandContext
* delete unneeded PullRequestContext since it just duplicated what is in CommandContext
* split fields inside CommandContext into Repo, PullRequest, and User models
* clean up unused fields
* remove base_executor stuff which was trying to do inheritance in go and didn't get us anywhere
* clean up unused code and assets
* created a locking.Client that creates the Keys that are used on the front-end. This allows the backends to store the locks any way they like as long as they support the interface
2017-06-17 14:14:21 -07:00
Luke Kysow
57f188f95f Unlock locks when pull request merged (#19)
* Add new FindLocksForPull method to locking backends
* Listen for pull request closed events and delete locks
* DynamoDB handling its own serialization. Implement LocksByPull
* Fix routing to work with encoded lockID
* Move locking backends to individual packages
* Change flag from locking-table to locking-dynamodb-table
2017-06-13 22:48:34 -07:00
Luke Kysow
d1bda5ff28 Use cobra and viper for cli/config (#20)
* #15 Use cobra and viper for cli/config

* Run gofmt
2017-06-07 21:20:37 -07:00