Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin cache. Don't run workspace if unneeded. #82

Merged
merged 1 commit into from
Mar 20, 2018
Merged

Conversation

lkysow
Copy link
Member

@lkysow lkysow commented Mar 20, 2018

Fixes #34

  • run terraform with TF_PLUGIN_CACHE_DIR set so that terraform init will
    be faster.
  • check which workspace we're in and don't switch unless we need to.
  • run terraform with TF_IN_AUTOMATION set so the plan output doesn't
    have instructions that don't make sense. Ex.
This plan was saved to: /tmp/atlantis/data/repos/lkysow/atlantis-example/3/default/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/tmp/atlantis/data/repos/lkysow/atlantis-example/3/default/default.tfplan"

@codecov
Copy link

codecov bot commented Mar 20, 2018

Codecov Report

Merging #82 into master will decrease coverage by 0.46%.
The diff coverage is 5.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #82      +/-   ##
==========================================
- Coverage   64.09%   63.62%   -0.47%     
==========================================
  Files          40       40              
  Lines        1916     1930      +14     
==========================================
  Hits         1228     1228              
- Misses        626      640      +14     
  Partials       62       62
Impacted Files Coverage Δ
server/events/terraform/terraform_client.go 6.66% <0%> (-1.54%) ⬇️
server/server.go 70.08% <100%> (ø) ⬆️
server/events/comment_parser.go 95.29% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2dbb894...b507bd0. Read the comment docs.

- run terraform with TF_PLUGIN_CACHE_DIR set so that terraform init will
be faster.
- check which workspace we're in and don't switch unless we need to.
- run terraform with TF_IN_AUTOMATION set so the plan output doesn't
have instructions that don't make sense. Ex.
```
This plan was saved to: /tmp/atlantis/data/repos/lkysow/atlantis-example/3/default/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/tmp/atlantis/data/repos/lkysow/atlantis-example/3/default/default.tfplan"
```
@lkysow lkysow merged commit 6bf86df into master Mar 20, 2018
@lkysow lkysow deleted the speedup branch March 20, 2018 22:08
meringu pushed a commit to meringu/atlantis that referenced this pull request May 29, 2023
* Run terraform init and env select and new with version

* Removing RunCommand now using RunCommandWithVersion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant