founders_template 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile-rails6.lock +1 -1
- data/lib/founders_template/cli.rb +19 -1
- data/lib/founders_template/version.rb +1 -1
- data/templates/terraform-production-envrc.erb +3 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22beacd3b13e3f9a383977e26de4300229026869412156f6e007c5457964b7c6
|
4
|
+
data.tar.gz: 6508f48c216d57ed5e8fe1919839229be715bb42f4611acce97787a9b18e5e36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6faab674011be1bd26704aeebe296ba8fe6374ccbac85685f18bb768f0fb58b2cd928b0bcc69e4f720e31a9a549235e8783a4514de62dd0162d26b63353d41f8
|
7
|
+
data.tar.gz: bafb6e405ea20d725928a0c2d7fdcc15f90905ce5921376aaecab141e39a696c7aaf6063a9ca212918c318f8c132594c8110a2a0534dbb34f9742e8cf68e3cf5
|
data/Gemfile-rails6.lock
CHANGED
@@ -11,7 +11,7 @@ require 'yaml'
|
|
11
11
|
require 'founders_template/utils'
|
12
12
|
require 'founders_template/config_file'
|
13
13
|
|
14
|
-
REQUIRED_SYSTEM_TOOLS = %w( direnv ).freeze
|
14
|
+
REQUIRED_SYSTEM_TOOLS = %w( direnv chamber ).freeze
|
15
15
|
SCRIPT_PATH = File.expand_path(File.join(__dir__, '..', '..', 'bash')).freeze
|
16
16
|
CREDENTIALS_PATH = 'config/credentials'
|
17
17
|
CREDENTIALS_KEY_FILE = File.join(CREDENTIALS_PATH, 'production.key').freeze
|
@@ -48,6 +48,7 @@ module FoundersTemplate
|
|
48
48
|
ensure_aws_credentials
|
49
49
|
ensure_credentials_key
|
50
50
|
ensure_secret_key
|
51
|
+
ensure_github_oauth_token
|
51
52
|
|
52
53
|
template 'buildspec.yml.erb', 'buildspec.yml'
|
53
54
|
template 'dockerignore.erb', '.dockerignore'
|
@@ -73,9 +74,26 @@ module FoundersTemplate
|
|
73
74
|
|
74
75
|
template 'terraform-production-backend.tf.erb', 'terraform/production/backend.tf'
|
75
76
|
template 'terraform-production.tfvars.erb', 'terraform/production/terraform.tfvars'
|
77
|
+
template 'terraform-production-envrc.erb', 'terraform/production/.envrc'
|
76
78
|
template 'terraform-shared.tfvars.erb', 'terraform/shared/terraform.tfvars'
|
77
79
|
end
|
78
80
|
|
81
|
+
def ensure_github_oauth_token
|
82
|
+
chamber_write(:github_token, ask('GitHub Oauth Token:')) unless chamber_key?(:github_token)
|
83
|
+
end
|
84
|
+
|
85
|
+
def chamber_key?(key)
|
86
|
+
system("chamber read #{chamber_repo_key} #{key} > /dev/null 2>&1")
|
87
|
+
end
|
88
|
+
|
89
|
+
def chamber_write(key, value)
|
90
|
+
system("chamber write #{chamber_repo_key} #{key} #{value} > /dev/null 2>&1")
|
91
|
+
end
|
92
|
+
|
93
|
+
def chamber_repo_key
|
94
|
+
"#{app_config.slugified_name}-terraform"
|
95
|
+
end
|
96
|
+
|
79
97
|
def ensure_aws_credentials
|
80
98
|
return if aws_credentials?
|
81
99
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: founders_template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Trae Robrock
|
@@ -137,6 +137,7 @@ files:
|
|
137
137
|
- templates/dockerignore.erb
|
138
138
|
- templates/ft.yml.erb
|
139
139
|
- templates/terraform-production-backend.tf.erb
|
140
|
+
- templates/terraform-production-envrc.erb
|
140
141
|
- templates/terraform-production.tfvars.erb
|
141
142
|
- templates/terraform-shared.tfvars.erb
|
142
143
|
- templates/terraform/modules/application/main.tf
|