pcf_blue_green 0.0.7 → 0.0.8

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: b10b6e44b1667c5d4a7cd3b3b4592b2c8cd4e780
4
- data.tar.gz: bf7a76935370d4d51d88cd1547e3f6dab21e9db9
3
+ metadata.gz: e792a177f405fab759cf09583051e3e91d2464c9
4
+ data.tar.gz: 706a8bc4cb350e9ebecfdb1bd76648df81c4afa6
5
5
  SHA512:
6
- metadata.gz: f188a42eaba474e19caeaca127ba3b6d4a49484bbf1353df76e28bf297ae6c4adfd2dc9eab9fd61c549748e84886ad7edac20b1fb425ff051261baa7c9efc6f1
7
- data.tar.gz: f0bb624d396fe9479e85d2cdb09705cd1b914d800131cd50a2cf7be74fc867d44c519c7ea434c52bfa98ecb677f07c798de05f7b6a8402e2ce90216f035f6e78
6
+ metadata.gz: 5f4b53a10ee0d4fec29964dd4326337db3d1413a229d7f1b93959ff40fb7d5767c24ebf84caf42918a6027efb73db06df5ed76ddaba7e055b1c3e8c6e891903d
7
+ data.tar.gz: 856881b33bb0b8ebf19f7413de39ff05964e32c4ac8a3345e4674be783d9259482d456d1d81d98df5da87c155aaadba200f73f179e75abe58a204dad7f497f83
@@ -1,3 +1,3 @@
1
1
  module PcfBlueGreen
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -85,11 +85,23 @@ function check-health {
85
85
  fi
86
86
  else
87
87
  curl -fsSIL --user "${BASIC_AUTH_USERNAME}:${BASIC_AUTH_PASSWORD}" ${app_url} --insecure
88
- echo -e "${BGre}curl of ${app_url} 200 OK"
88
+ status=$(curl -sSIL -o /dev/null -w "%{http_code}" ${app_url} --insecure)
89
+ if [ $status == 200 ] ; then
90
+ echo -e "${BGre}curl of ${app_url} 200 OK"
91
+ else
92
+ echo -e "${BGre}curl of ${app_url} ${status} ERR"
93
+ exit 1
94
+ fi
89
95
  fi
90
96
  else
91
97
  curl -fsSIL --user "${BASIC_AUTH_USERNAME}:${BASIC_AUTH_PASSWORD}" ${app_url} --insecure
92
- echo -e "${BGre}curl of ${app_url} 200 OK"
98
+ status=$(curl -sSIL -o /dev/null -w "%{http_code}" ${app_url} --insecure)
99
+ if [ $status == 200 ] ; then
100
+ echo -e "${BGre}curl of ${app_url} 200 OK"
101
+ else
102
+ echo -e "${BGre}curl of ${app_url} ${status} ERR"
103
+ exit 1
104
+ fi
93
105
  fi
94
106
  }
95
107
 
@@ -149,6 +161,7 @@ function finally {
149
161
  function on-fail {
150
162
  finally
151
163
  echo -e "${BRed}DEPLOY FAILED${RCol} - you may need to check '${BYel}cf apps${RCol}' and '${BYel}cf routes${RCol}' and do manual cleanup"
164
+ exit 1
152
165
  }
153
166
 
154
167
  function blue-green {
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.0.7
4
+ version: 0.0.8
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-02-15 00:00:00.000000000 Z
11
+ date: 2017-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout