Skip to content

Commit 4af4446

Browse files
committed
fix: ecs 테스트 실행 결과 확인 추가
1 parent fd5e44d commit 4af4446

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/deploy-migration-test.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,22 @@ jobs:
226226
run: |
227227
aws ecs wait tasks-stopped --cluster migration-cluster --tasks ${{ steps.ecs-run-task.outputs.task_arn }}
228228
229+
- name: Check ECS Task Exit Code
230+
run: |
231+
TASK_ARN=${{ steps.ecs-run-task.outputs.task_arn }}
232+
EXIT_CODE=$(aws ecs describe-tasks \
233+
--cluster migration-cluster \
234+
--tasks $TASK_ARN \
235+
--query "tasks[0].containers[0].exitCode" \
236+
--output text)
237+
238+
echo "ECS Task Exit Code: $EXIT_CODE"
239+
240+
if [ "$EXIT_CODE" != "0" ]; then
241+
echo "Migration task failed with exit code $EXIT_CODE"
242+
exit 1
243+
fi
244+
229245
- name: Get DB Credentials from SSM
230246
id: get-db-creds
231247
run: |
@@ -262,7 +278,6 @@ jobs:
262278
--cli-binary-format raw-in-base64-out \
263279
response.json
264280
265-
266281
# notify:
267282
# name: Send Discord Notification (Migration)
268283
# runs-on: ubuntu-latest

0 commit comments

Comments
 (0)