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 +4 -4
- data/lib/pcf_blue_green/version.rb +1 -1
- data/lib/shared-deploy-functions.sh +8 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5baf5b31561c31847adcde44182471f3a07722d8
|
4
|
+
data.tar.gz: 7b3f0d2eddce862568efbe7e61fb8b7942a07fd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d9798bf7e1b21f13112cd9402080c79c158d398365cfc5ebd86cbe36ab683ae519d395e694eac3da62eacf32825f173dde5e9553432b3ed2c725804587fcb92
|
7
|
+
data.tar.gz: 815f082c07d4927522f25b9397e1bd7c352d68a506325263e7a081c8a454c31a19fad16a28f1be958b5b40e4a2b45f175e6d25b5b946cc7c84034d9d07243c46
|
@@ -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
|
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 ${
|
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
|
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 "$
|
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 '($
|
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 "$
|
169
|
+
if [ -n "$handle_all_paths" ]; then
|
170
170
|
set -x
|
171
|
-
run-cmd cf routes | tail -n +4 | awk '($
|
172
|
-
cf routes | tail -n +4 | awk '($
|
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.
|
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-
|
11
|
+
date: 2017-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|