summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Walters <drewwalters96@gmail.com>2019-01-18 12:59:01 -0600
committerDrew Walters <drewwalters96@gmail.com>2019-01-18 22:36:28 +0000
commitf7d4b2922163f18f29131bf9cd96d5339f8fb97a (patch)
tree06da4ee0b42d2bb51184c63198aaca7d87e7ec79
parent488048ce767556fb83c0cc2b30a5d166470835c6 (diff)
airskiff: Add steps to Shipyard wait script
Currently, the Airskiff gate does not recognize failures because the gate script only verifies that an action lifecycle enters a COMPLETE state; however, a lifecycle in COMPLETE status is not always an indication of a successful deployment. This commit updates the wait_for_shipyard script to check the status of each action step and results in exit_code 1 if any steps failed. Change-Id: If5117c4638652b8d5b91fe73ede0f5e19a1e2cc1
Notes
Notes (review): Code-Review+2: Matt McEuen <matt.mceuen@att.com> Code-Review+1: Dustin Specker <dustin.specker@att.com> Code-Review+2: Kaspars Skels <kaspars.skels@gmail.com> Workflow+1: Kaspars Skels <kaspars.skels@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 22 Jan 2019 18:23:58 +0000 Reviewed-on: https://review.openstack.org/631886 Project: openstack/airship-treasuremap Branch: refs/heads/master
-rwxr-xr-xtools/gate/wait-for-shipyard.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/gate/wait-for-shipyard.sh b/tools/gate/wait-for-shipyard.sh
index f949f3b..5786563 100755
--- a/tools/gate/wait-for-shipyard.sh
+++ b/tools/gate/wait-for-shipyard.sh
@@ -26,6 +26,10 @@ while true; do
26 status=$(${SHIPYARD} describe "$ACTION" | grep -i "Lifecycle" | \ 26 status=$(${SHIPYARD} describe "$ACTION" | grep -i "Lifecycle" | \
27 awk '{print $2}') 27 awk '{print $2}')
28 28
29 steps=$(${SHIPYARD} describe "$ACTION" | grep -i "step/" | \
30 awk '{print $3}')
31
32 # Verify lifecycle status
29 if [ "${status}" == "Failed" ]; then 33 if [ "${status}" == "Failed" ]; then
30 echo -e "\n$ACTION FAILED\n" 34 echo -e "\n$ACTION FAILED\n"
31 ${SHIPYARD} describe "${ACTION}" 35 ${SHIPYARD} describe "${ACTION}"
@@ -33,6 +37,15 @@ while true; do
33 fi 37 fi
34 38
35 if [ "${status}" == "Complete" ]; then 39 if [ "${status}" == "Complete" ]; then
40 # Verify status of each action step
41 for step in $steps; do
42 if [ "${step}" == "failed" ]; then
43 echo -e "\n$ACTION FAILED\n"
44 ${SHIPYARD} describe "${ACTION}"
45 exit 1
46 fi
47 done
48
36 echo -e "\n$ACTION completed SUCCESSFULLY\n" 49 echo -e "\n$ACTION completed SUCCESSFULLY\n"
37 ${SHIPYARD} describe "${ACTION}" 50 ${SHIPYARD} describe "${ACTION}"
38 exit 0 51 exit 0