Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/jobs/helm_aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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