File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,21 @@ jobs:
40
40
with :
41
41
aws-region : ${{ vars.AWS_REGION }}
42
42
role-to-assume : arn:aws:iam::${{ secrets[format('{0}_ACCOUNT_ID', env.ACCOUNT)] }}:role/delegatedadmin/developer/ab2d-${{ env.ACCOUNT }}-github-actions
43
+
43
44
- name : Deploy ECS service to run on latest image in ECR
44
45
env :
45
46
SERVICE_NAME : ab2d-${{ vars[format('{0}_DEPLOYMENT_ENV', inputs.environment)] }}-${{ inputs.module }}
46
47
run : |
47
48
echo "Deploying service $SERVICE_NAME"
48
49
aws ecs update-service --cluster "$SERVICE_NAME" --service "$SERVICE_NAME" --force-new-deployment > /dev/null
49
- aws ecs wait services-stable --cluster "$SERVICE_NAME" --services "$SERVICE_NAME"
50
+ echo "Waiting for ECS service to stabilize..."
51
+ exit_status=1
52
+ set +e
53
+ while [ "$exit_status" != "0" ]; do
54
+ aws ecs wait services-stable --cluster "$SERVICE_NAME" --services "$SERVICE_NAME"
55
+ exit_status="$?"
56
+ echo "Wait result: $exit_status"
57
+ done
58
+ set -e
59
+ echo "✅ ECS service stabilized."
60
+
You can’t perform that action at this time.
0 commit comments