Browse Source

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
Drew Walters 3 months ago
parent
commit
f7d4b29221
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      tools/gate/wait-for-shipyard.sh

+ 13
- 0
tools/gate/wait-for-shipyard.sh View File

@@ -26,6 +26,10 @@ while true; do
26 26
         status=$(${SHIPYARD} describe "$ACTION" | grep -i "Lifecycle" | \
27 27
                 awk '{print $2}')
28 28
 
29
+        steps=$(${SHIPYARD} describe "$ACTION" | grep -i "step/" | \
30
+                awk '{print $3}')
31
+
32
+        # Verify lifecycle status
29 33
         if [ "${status}" == "Failed" ]; then
30 34
                 echo -e "\n$ACTION FAILED\n"
31 35
                 ${SHIPYARD} describe "${ACTION}"
@@ -33,6 +37,15 @@ while true; do
33 37
         fi
34 38
 
35 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 49
                 echo -e "\n$ACTION completed SUCCESSFULLY\n"
37 50
                 ${SHIPYARD} describe "${ACTION}"
38 51
                 exit 0

Loading…
Cancel
Save