Browse Source

Merge "airskiff: Add steps to Shipyard wait script"

Zuul 3 months ago
parent
commit
6a21cb58eb
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