Skip to content

Commit 253d232

Browse files
authored
feat(deploy): add SDK service to ECS deployment pipeline (#6484)
1 parent b241f54 commit 253d232

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/actions/api-deploy-ecs/action.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ inputs:
1818
aws_ecs_service_name:
1919
description: The name of the ECS service to deploy to.
2020
required: true
21+
aws_ecs_sdk_service_name:
22+
description: The name of the SDK ECS service to deploy to.
23+
required: true
2124
aws_vpc_subnet_id:
2225
description: The id of the AWS VPC subnet to use for running migration tasks.
2326
required: true
@@ -97,6 +100,13 @@ runs:
97100
service: ${{ inputs.aws_ecs_service_name }}
98101
task-definition: ${{ steps.task-def-api.outputs.task-definition }}
99102

103+
- name: Deploy Amazon ECS SDK service task definition
104+
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
105+
with:
106+
cluster: ${{ inputs.aws_ecs_cluster_name }}
107+
service: ${{ inputs.aws_ecs_sdk_service_name }}
108+
task-definition: ${{ steps.task-def-api.outputs.task-definition }}
109+
100110
# The DynamoDB Identity Migrator uses the same task definition as the SQL schema migrator but overrides the container definition
101111
# with the new django execute target
102112
- name: Update Identity migrate rule with target
@@ -136,8 +146,8 @@ runs:
136146
]'
137147
shell: bash
138148

139-
- name: Wait for service to be stable
140-
run:
141-
aws ecs wait services-stable --cluster ${{ inputs.aws_ecs_cluster_name }} --services ${{
142-
inputs.aws_ecs_service_name }}
149+
- name: Wait for services to be stable
150+
run: |
151+
aws ecs wait services-stable --cluster ${{ inputs.aws_ecs_cluster_name }} --services ${{ inputs.aws_ecs_service_name }}
152+
aws ecs wait services-stable --cluster ${{ inputs.aws_ecs_cluster_name }} --services ${{ inputs.aws_ecs_sdk_service_name }}
143153
shell: bash

.github/workflows/.reusable-deploy-ecs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ jobs:
8484
aws_ecs_cluster_name: ${{ vars.AWS_ECS_CLUSTER_NAME }}
8585
aws_ecs_cluster_arn: ${{ vars.AWS_ECS_CLUSTER_ARN }}
8686
aws_ecs_service_name: ${{ vars.AWS_ECS_SERVICE_NAME }}
87+
aws_ecs_sdk_service_name: ${{ vars.AWS_ECS_SDK_SERVICE_NAME }}
8788
aws_vpc_subnet_id: ${{ vars.AWS_VPC_SUBNET_ID }}
8889
aws_ecs_security_group_id: ${{ vars.AWS_ECS_SECURITY_GROUP_ID }}
8990
aws_identity_migration_event_bus_name: ${{ vars.AWS_IDENTITY_MIGRATION_EVENT_BUS_NAME }}

0 commit comments

Comments
 (0)