pcf_blue_green 0.43.2 → 0.43.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pcf_blue_green/version.rb +1 -1
- data/lib/pcf_blue_green.rb +15 -14
- 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: cc93936f039fbbed554671bd0fcf01305759fd84
|
4
|
+
data.tar.gz: 425b4b419b52e25b08043647315fa4f2d66e67a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09678294ad4b849c2f3de0759fac8c7a20be782743c4824866aad86570f661211cf11b2026049556734ae2b399aab346c3f7ae1ec974b796073dbf47e4035c69
|
7
|
+
data.tar.gz: 5eee804026f78e1cf9caf1e0f4a009eaba5308182a57f0547665940fb9bb70820c74b585f15deddb7e6ac2a31de20849400c6e3ed9d4ce0540937099d186702a
|
data/lib/pcf_blue_green.rb
CHANGED
@@ -36,23 +36,24 @@ module PcfBlueGreen
|
|
36
36
|
|
37
37
|
def remove_routes
|
38
38
|
removed_routes = []
|
39
|
-
if entity = entity_for(ENV['
|
39
|
+
if entity = entity_for(ENV['cf_app'])
|
40
40
|
routes_stdout(entity)['resources'].each do |resource|
|
41
41
|
domain_url = resource['entity']['domain_url']
|
42
42
|
domain = domain_for(domain_url)
|
43
|
-
if resource['entity']['
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
43
|
+
if resource['entity']['host'] == ENV['green']
|
44
|
+
if resource['entity']['path'].empty?
|
45
|
+
cmd = "#{delete_route_command} #{domain} -n #{resource['entity']['host']} -f"
|
46
|
+
else
|
47
|
+
cmd = "#{delete_route_command} #{domain} -n #{resource['entity']['host']} --path #{resource['entity']['path']} -f"
|
48
|
+
end
|
49
|
+
puts cmd
|
50
|
+
shell = Mixlib::ShellOut.new(cmd)
|
51
|
+
shell.run_command
|
52
|
+
removed_routes += shell.stdout.split("\n")
|
53
|
+
unless shell.stderr.empty?
|
54
|
+
puts shell.stderr
|
55
|
+
raise PcfBlueGreen::BlueGreenDeploymentFailed
|
56
|
+
end
|
56
57
|
end
|
57
58
|
end
|
58
59
|
end
|