File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ steps:
118118 cmd_name : Reset the replica count of each deployment for the specified env
119119 deploy : false
120120 cmd : |
121+ declare -a error_deployments
121122 if ! [[ -z "<< parameters.scale_down_time_limit >>" ]]; then
122123 current_timestamp=$(date +%s)
123124 time_limit_timestamp=$(date -d "<< parameters.scale_down_time_limit >>" +%s)
@@ -142,8 +143,12 @@ steps:
142143 fi
143144 kubectl scale --replicas=$REPLICA_COUNT deployment/$DEPLOYMENT -n $NAMESPACE
144145 if [[ << parameters.wait_for_pods_ready >> = true ]]; then
145- kubectl rollout status deployment/$DEPLOYMENT -n $NAMESPACE --timeout << parameters.wait_for_pods_ready_timeout >>
146+ kubectl rollout status deployment/$DEPLOYMENT -n $NAMESPACE --timeout << parameters.wait_for_pods_ready_timeout >> || error_deployments+=("$DEPLOYMENT")
146147 fi
147148 done
148149 done
150+ if [[ ${#error_deployments[@]} != 0 ]]; then
151+ echo "The following deployments failed to be scaled up:" ${error_deployments[*]}
152+ exit 1
153+ fi
149154 fi
You can’t perform that action at this time.
0 commit comments