diff --git a/src/jobs/helm_aws.yml b/src/jobs/helm_aws.yml index a47d8f13..d850e5fc 100644 --- a/src/jobs/helm_aws.yml +++ b/src/jobs/helm_aws.yml @@ -118,6 +118,7 @@ steps: cmd_name: Reset the replica count of each deployment for the specified env deploy: false cmd: | + declare -a error_deployments if ! [[ -z "<< parameters.scale_down_time_limit >>" ]]; then current_timestamp=$(date +%s) time_limit_timestamp=$(date -d "<< parameters.scale_down_time_limit >>" +%s) @@ -142,8 +143,12 @@ steps: fi kubectl scale --replicas=$REPLICA_COUNT deployment/$DEPLOYMENT -n $NAMESPACE if [[ << parameters.wait_for_pods_ready >> = true ]]; then - kubectl rollout status deployment/$DEPLOYMENT -n $NAMESPACE --timeout << parameters.wait_for_pods_ready_timeout >> + kubectl rollout status deployment/$DEPLOYMENT -n $NAMESPACE --timeout << parameters.wait_for_pods_ready_timeout >> || error_deployments+=("$DEPLOYMENT") fi done done + if [[ ${#error_deployments[@]} != 0 ]]; then + echo "The following deployments failed to be scaled up:" ${error_deployments[*]} + exit 1 + fi fi