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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 33782d6af5e636eabbfe524db4dd0d42973bcac9
4
- data.tar.gz: 4cc1288b6e243aa209deeb3c63fff81ac993a461
3
+ metadata.gz: cc93936f039fbbed554671bd0fcf01305759fd84
4
+ data.tar.gz: 425b4b419b52e25b08043647315fa4f2d66e67a0
5
5
  SHA512:
6
- metadata.gz: 5adf584e6910896416d6819ef6f0281d10668a4d1d86b28d73a390c6ee2109ec64dd43177a633c8d6fdaa3b887ade251ac5d2df7cee553d228955169177f6699
7
- data.tar.gz: a26b681e7e43b1e7891ceeb6836e32387ac42fd35f3c7d6bb3326bcba738f5301e8900330d3a9e17965e335b75f5208a60e739e638782efa4868b88300770f36
6
+ metadata.gz: 09678294ad4b849c2f3de0759fac8c7a20be782743c4824866aad86570f661211cf11b2026049556734ae2b399aab346c3f7ae1ec974b796073dbf47e4035c69
7
+ data.tar.gz: 5eee804026f78e1cf9caf1e0f4a009eaba5308182a57f0547665940fb9bb70820c74b585f15deddb7e6ac2a31de20849400c6e3ed9d4ce0540937099d186702a
@@ -1,3 +1,3 @@
1
1
  module PcfBlueGreen
2
- VERSION = "0.43.2"
2
+ VERSION = "0.43.3"
3
3
  end
@@ -36,23 +36,24 @@ module PcfBlueGreen
36
36
 
37
37
  def remove_routes
38
38
  removed_routes = []
39
- if entity = entity_for(ENV['green'])
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']['path'].empty?
44
- cmd = "#{delete_route_command} #{domain} -n #{resource['entity']['host']} -f"
45
- else
46
- cmd = "#{delete_route_command} #{domain} -n #{resource['entity']['host']} --path #{resource['entity']['path']} -f"
47
- end
48
- puts cmd
49
- shell = Mixlib::ShellOut.new(cmd)
50
- shell.run_command
51
- removed_routes += shell.stdout.split("\n")
52
-
53
- unless shell.stderr.empty?
54
- puts shell.stderr
55
- raise PcfBlueGreen::BlueGreenDeploymentFailed
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pcf_blue_green
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.43.2
4
+ version: 0.43.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pawel Bardzinski