pcf_blue_green 0.34 → 0.35

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: aa9b96fdedb9e490e6e9f6805d28d3f9be2d5054
4
- data.tar.gz: caaf96930f216fc1726fb47ed662732261a7dc90
3
+ metadata.gz: 5baf5b31561c31847adcde44182471f3a07722d8
4
+ data.tar.gz: 7b3f0d2eddce862568efbe7e61fb8b7942a07fd1
5
5
  SHA512:
6
- metadata.gz: 5468809bc1568a056c0b5a120899f23af0a12d2fd6035bd691c0f673820223d5eb755bf165f738b2e4e7a01bc44c7361cee496f01cd247c1f86fc5fabb1cc6d4
7
- data.tar.gz: f1bfc92048f4f040c44cb92464c163071145cf1c2943c770930848702842d606ca517d2964d178741bbc23f51456767f2f9b41f261d81679e91b331f1c734274
6
+ metadata.gz: 9d9798bf7e1b21f13112cd9402080c79c158d398365cfc5ebd86cbe36ab683ae519d395e694eac3da62eacf32825f173dde5e9553432b3ed2c725804587fcb92
7
+ data.tar.gz: 815f082c07d4927522f25b9397e1bd7c352d68a506325263e7a081c8a454c31a19fad16a28f1be958b5b40e4a2b45f175e6d25b5b946cc7c84034d9d07243c46
@@ -1,3 +1,3 @@
1
1
  module PcfBlueGreen
2
- VERSION = "0.34"
2
+ VERSION = "0.35"
3
3
  end
@@ -135,13 +135,13 @@ function remap-routes {
135
135
  # Variables used:
136
136
 
137
137
  # Some applications have extra routes that contain paths. If that's the case
138
- # then handle_all_green_paths environmental variable is used to manage paths.
138
+ # then handle_all_paths environmental variable is used to manage paths.
139
139
  # to a different hostname
140
140
 
141
141
  # Code logic:
142
142
 
143
143
  # execute the code below:
144
- if [ -z ${handle_all_green_paths+x} ]; then
144
+ if [ -z ${handle_all_paths+x} ]; then
145
145
  run-cmd cf routes | tail -n +4 | grep ${cf_app} | awk '{print $3" -n "$2}'
146
146
  cf routes | tail -n +4 | grep ${cf_app} | awk '{print $3" -n "$2}' | xargs -n 3 cf map-route ${green}
147
147
  fi
@@ -151,10 +151,10 @@ function remap-routes {
151
151
  run-cmd cf routes | awk '($4==ENVIRON["cf_app"]) {print $3" -n " $2 }' | xargs -n 3 cf map-route ${green}
152
152
  fi
153
153
 
154
- # if handle_all_green_paths variable is set then
154
+ # if handle_all_paths variable is set then
155
155
  # 1. routes that's app name is cf_app are found
156
156
  # 2. paths are mapped to the green app
157
- if [ -n "$handle_all_green_paths" ]; then
157
+ if [ -n "$handle_all_paths" ]; then
158
158
  run-cmd cf routes | tail -n +4 | awk '($5==ENVIRON["cf_app"]) {print $3" -n "$2 " --path "substr($4,2) }'
159
159
  cf routes | tail -n +4 | awk '($5==ENVIRON["cf_app"]) {print $3" -n "$2 " --path "substr($4,2) }' | xargs -n 5 cf map-route ${green}
160
160
  fi
@@ -164,12 +164,12 @@ function remap-routes {
164
164
  function remove-blue {
165
165
  run-cmd cf delete ${blue} -f
166
166
  run-cmd cf rename $green $blue
167
- run-cmd cf routes | awk '($4==ENVIRON["green"]) {print $3" -n " $2 " -f"}' | xargs -n 4 cf delete-route
167
+ run-cmd cf routes | awk '($2==ENVIRON["green"]) {print $3" -n " $2 " -f"}' | xargs -n 4 cf delete-route
168
168
 
169
- if [ -n "$handle_all_green_paths" ]; then
169
+ if [ -n "$handle_all_paths" ]; then
170
170
  set -x
171
- run-cmd cf routes | tail -n +4 | awk '($5==ENVIRON["green"]) {print $3" -n "$2 " --path "substr($4,2)" -f"}' | xargs -n 6
172
- cf routes | tail -n +4 | awk '($5==ENVIRON["green"]) {print $3" -n "$2 " --path "substr($4,2)" -f"}' | xargs -n 6 cf delete-route
171
+ run-cmd cf routes | tail -n +4 | awk '($2==ENVIRON["green"]) {print $3" -n "$2 " --path "substr($4,2)" -f"}' | xargs -n 6
172
+ cf routes | tail -n +4 | awk '($2==ENVIRON["green"]) {print $3" -n "$2 " --path "substr($4,2)" -f"}' | xargs -n 6 cf delete-route
173
173
  set +x
174
174
  fi
175
175
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pcf_blue_green
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.34'
4
+ version: '0.35'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pawel Bardzinski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-05 00:00:00.000000000 Z
11
+ date: 2017-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout