iapi-idlc-sdk-pfm 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iapi-idlc-sdk-pfm/command/base.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c0f88b0c2f50e9757c3b8e5bd81a20af7ba90fb53b4e3fd290b4cf71d7312ee
|
4
|
+
data.tar.gz: 7c98aa4cef505b75bf6481c731840572e342ac36221b90b66e28b0e19e69a41a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64616a73140318ede865033b1294b7d081d531ab38006872d101ccff549d3e281f9be9c847c8cd66a00d2715444487450fcc9d2bc8aedad9b60b16c624839f51
|
7
|
+
data.tar.gz: d7edaac5dcbc4e6b7e037648535a5fbf9655fd8169bd817868f5ef2b3bdd0016b3160308c01af799b1aa7c62982659ac14f9d64e11d2c3cf3f31092bf498cec4
|
@@ -68,6 +68,14 @@ module Pfm
|
|
68
68
|
@workspace.cleanup unless @workspace.empty?
|
69
69
|
end
|
70
70
|
|
71
|
+
def download_private_key(bucket, subkey, outdir)
|
72
|
+
s3 = Aws::S3::Client.new(region: SETTINGS['AWS_REGION'])
|
73
|
+
resp = s3.get_object(bucket: bucket, key: "#{subkey}/private_key.pem", response_target: "#{outdir}/private_key.pem")
|
74
|
+
true
|
75
|
+
rescue Aws::S3::Errors::NoSuchKey
|
76
|
+
false
|
77
|
+
end
|
78
|
+
|
71
79
|
def build_setup
|
72
80
|
Packer::Binary.configure do |config|
|
73
81
|
config.version = SETTINGS['PACKER_VERSION']
|
@@ -151,6 +159,8 @@ module Pfm
|
|
151
159
|
Idlc::Deploy::Config.add_deployment_var('build', @config[:server_build])
|
152
160
|
Idlc::Deploy::Config.add_deployment_var('app_release', @config[:app_release])
|
153
161
|
|
162
|
+
FileUtils.mkdir_p "inf/env/kp"
|
163
|
+
download_private_key(bucket_name, sub_bucket, "#{inf_base_dir}/env/kp")
|
154
164
|
Idlc::Deploy::Keypair.generate("#{inf_base_dir}/env/kp")
|
155
165
|
@workspace.flatten("#{inf_base_dir}/tf", 'tf')
|
156
166
|
@workspace.add("#{inf_base_dir}/env/kp")
|
@@ -205,6 +215,7 @@ module Pfm
|
|
205
215
|
ENV['APP_RELEASE'] = @config[:app_release]
|
206
216
|
|
207
217
|
FileUtils.mkdir_p "inf/env/kp"
|
218
|
+
download_private_key(env_metadata['account']['tfstate_bucket'], env_metadata['environment_key'], "inf/env/kp")
|
208
219
|
Idlc::Deploy::Keypair.generate("inf/env/kp")
|
209
220
|
|
210
221
|
config = Idlc::Deploy::Config.new(SETTINGS['AWS_REGION'])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iapi-idlc-sdk-pfm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Cazell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-01-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|