biosphere 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/biosphere +4 -4
- data/lib/biosphere/suite.rb +6 -1
- data/lib/biosphere/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 647938b02f253417fc66f2c441c07ab40ab6b79e
|
4
|
+
data.tar.gz: 48d3703a751c9395c977f7f390b1c7d2db5e24be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c98f1859dba18cbb6f3b75c4ce62757a6c810e102b77e3e5c932b3c8f762df452f63a8f21a4ba228f53d55eaf47343099dd162efa5ca3747a98feb7379677ebc
|
7
|
+
data.tar.gz: b555e8c058376a6ab67b41a9561f87761f6004856765c0bfba03198d7db3b06b5b93fde64158c81ee62b31f00ef733c1828ff4953086a6f4903be4734f9908f0
|
data/bin/biosphere
CHANGED
@@ -164,7 +164,7 @@ if ARGV[0] == "build" && options.src
|
|
164
164
|
count = count + 1
|
165
165
|
end
|
166
166
|
|
167
|
-
puts "Wrote #{count} files
|
167
|
+
puts "Wrote #{count} files under #{options.build_dir}"
|
168
168
|
state.save()
|
169
169
|
s3.save("#{options.build_dir}/state.node") unless localmode
|
170
170
|
|
@@ -244,7 +244,7 @@ elsif ARGV[0] == "commit" && options.src
|
|
244
244
|
|
245
245
|
s3.set_lock()
|
246
246
|
s3.retrieve("#{options.build_dir}/#{deployment}.tfstate")
|
247
|
-
tf_plan_str = %x( terraform plan -state=#{options.build_dir}/#{deployment}.tfstate -out #{options.build_dir}/plan #{options.build_dir} )
|
247
|
+
tf_plan_str = %x( terraform plan -state=#{options.build_dir}/#{deployment}.tfstate -out #{options.build_dir}/plan #{options.build_dir}/#{deployment} )
|
248
248
|
tfplanning = Biosphere::CLI::TerraformPlanning.new()
|
249
249
|
plan = tfplanning.generate_plan(suite.deployments[deployment], tf_plan_str)
|
250
250
|
if !plan
|
@@ -278,7 +278,7 @@ elsif ARGV[0] == "commit" && options.src
|
|
278
278
|
#tf_apply = %x( terraform apply -state=#{state_file} #{options.build_dir})
|
279
279
|
#puts "\n" + tf_apply
|
280
280
|
begin
|
281
|
-
PTY.spawn("terraform apply #{targets} -state=#{state_file} #{options.build_dir}") do |stdout, stdin, pid|
|
281
|
+
PTY.spawn("terraform apply #{targets} -state=#{state_file} #{options.build_dir}/#{deployment}") do |stdout, stdin, pid|
|
282
282
|
begin
|
283
283
|
stdout.each { |line| puts line }
|
284
284
|
rescue Errno::EIO
|
@@ -292,7 +292,7 @@ elsif ARGV[0] == "commit" && options.src
|
|
292
292
|
command_output = ""
|
293
293
|
begin
|
294
294
|
puts "Refreshing terraform outputs"
|
295
|
-
PTY.spawn("terraform refresh -state=#{state_file} #{options.build_dir}") do |stdout, stdin, pid|
|
295
|
+
PTY.spawn("terraform refresh -state=#{state_file} #{options.build_dir}/#{deployment}") do |stdout, stdin, pid|
|
296
296
|
begin
|
297
297
|
stdout.each { |line| command_output << line }
|
298
298
|
rescue Errno::EIO
|
data/lib/biosphere/suite.rb
CHANGED
@@ -91,9 +91,14 @@ class Biosphere
|
|
91
91
|
end
|
92
92
|
|
93
93
|
@deployments.each do |name, deployment|
|
94
|
+
dir = destination_dir + "/" + deployment.name
|
95
|
+
if !File.directory?(dir)
|
96
|
+
Dir.mkdir(dir)
|
97
|
+
end
|
98
|
+
|
94
99
|
json_name = deployment.name + ".json.tf"
|
95
100
|
str = deployment.to_json(true) + "\n"
|
96
|
-
destination_name =
|
101
|
+
destination_name = dir + "/" + json_name
|
97
102
|
File.write(destination_name, str)
|
98
103
|
|
99
104
|
yield deployment.name, destination_name, str, deployment if block_given?
|
data/lib/biosphere/version.rb
CHANGED