pcf_blue_green 0.1.2 → 0.1.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: ed6439ea8cb5d692160a2d0b124ed256ae87ee2d
4
- data.tar.gz: 0382e96b32da37d05dde47b81fd39caf2d76b34b
3
+ metadata.gz: 581efa7598f1295c9d806403cd7e92077681d528
4
+ data.tar.gz: c46a22b4bfcb649fbf6ee6bf76d0303fca0c2a92
5
5
  SHA512:
6
- metadata.gz: 922abca826f39dbd1c50624d3d6fc843837d70d8bcfa8159f1f092adda3317eb8d7c1c6948fa098d09b37c2cf055d39ed33e88a01cf71a61b7b0ad6bd3aa29bc
7
- data.tar.gz: e0e91aeebe5911f4c3ec8bd9de410f510a56fcaa10f9748c14228f614f1911ba64e772a19ba21e26989e9dc9f466c866121dcdd88455103a407423dbc3be8513
6
+ metadata.gz: 8d87891678c2bbbbf38243ea454a404ab74377e62507105efed93345520539a284d40def6164b0522a4f7f5cf44b15b6f51c348bf535aab5be2fd321860a59d3
7
+ data.tar.gz: 200a9ced3b80934340bbc797f46476223ffcff7a6cc06de92aa6b33102651f081b981f83ef619485bb4e569f941b84c6b9deae700edf226c7c0404a7f88432bf
@@ -1,3 +1,3 @@
1
1
  module PcfBlueGreen
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -136,6 +136,9 @@ function remap-routes {
136
136
  run-cmd cf routes | tail -n +4 | grep ${cf_app} | awk '{print $3" -n "$2}'
137
137
  cf routes | tail -n +4 | grep ${cf_app} | awk '{print $3" -n "$2}' | xargs -n 3 cf map-route ${green}
138
138
  else
139
+ if [ -n "$map_main_route" ]; then
140
+ run-cmd cf routes | tail -n +4 | awk '($3==ENVIRON["domain"]) && ($2==ENVIRON["hostname"]) {print $3" -n " $2 }' | xargs -n 3 cf map-route ${green}
141
+ fi
139
142
  run-cmd cf routes | tail -n +4 | awk '($2==ENVIRON["sso_hostname"]) && ($5==ENVIRON["cf_app"]) {print $3" -n "$2 " --path "substr($4,2) }'
140
143
  cf routes | tail -n +4 | awk '($2==ENVIRON["sso_hostname"]) && ($5==ENVIRON["cf_app"]) {print $3" -n "$2 " --path "substr($4,2) }' | xargs -n 5 cf map-route ${green}
141
144
  fi
@@ -156,7 +159,7 @@ function remove-blue {
156
159
  }
157
160
 
158
161
  function get-domain {
159
- domain=$(cf routes | grep ${cf_app} | awk '{print $3}' | grep "^apps\\." | tail -1)
162
+ export domain=$(cf routes | grep ${cf_app} | awk '{print $3}' | grep "^apps\\." | tail -1)
160
163
  announce-task "Domain is ${domain}"
161
164
  }
162
165
 
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.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pawel Bardzinski