Skip to content

Commit

Permalink
fixup! feat(action): add ecs deployment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
IamAbbey committed Feb 15, 2024
1 parent d7ad582 commit 921f49a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
13 changes: 7 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,32 @@ runs:
poetry_cache_enabled: 'false'

- id: get-image-uri
uses: moneymeets/action-ecs-deploy/custom-deploy-steps/get-image-uri@feature/MD-7037-implement-ecs-deployment-workflow
uses: moneymeets/action-ecs-deploy/custom-deploy-steps/get-image-uri@master
with:
ecr_repository: ${{ inputs.ecr_repository }}
aws_region: ${{ inputs.aws_region }}

- name: Render and Deploy local-exec task definition to Amazon ECS
- name: Render and deploy local-exec task definition to Amazon ECS
id: deploy-local-task-definition
uses: moneymeets/action-ecs-deploy/custom-deploy-steps/create-task-definition@feature/MD-7037-implement-ecs-deployment-workflow
uses: moneymeets/action-ecs-deploy/custom-deploy-steps/create-task-definition@master
with:
application_id: ${{ inputs.ecr_repository }}-local-exec-${{ inputs.environment }}
image_uri: ${{ steps.get-image-uri.outputs.image-uri }}
aws_access_key_id: ${{ inputs.aws_access_key_id }}
aws_secret_access_key: ${{ inputs.aws_secret_access_key }}
aws_region: ${{ inputs.aws_region }}

- name: Render and Deploy task definition to Amazon ECS
- name: Render and deploy task definition to Amazon ECS
id: deploy-task-definition
uses: moneymeets/action-ecs-deploy/custom-deploy-steps/create-task-definition@feature/MD-7037-implement-ecs-deployment-workflow
uses: moneymeets/action-ecs-deploy/custom-deploy-steps/create-task-definition@master
with:
application_id: ${{ inputs.ecr_repository }}-${{ inputs.environment }}
image_uri: ${{ steps.get-image-uri.outputs.image-uri }}
aws_access_key_id: ${{ inputs.aws_access_key_id }}
aws_secret_access_key: ${{ inputs.aws_secret_access_key }}
aws_region: ${{ inputs.aws_region }}

# Service is managed by Pulumi, only desired count and task definition should be updated here
- name: Update service
shell: bash
run: |
Expand All @@ -79,7 +80,7 @@ runs:
- name: Await service stability
shell: bash
# Todo: re-evaluate logic after implementing circuit breaker in pulumi
# ToDo: MD-7199 Re-evaluate logic after deployment failures are correctly handled by ECS
id: check-service-stability
run: |
aws ecs wait services-stable \
Expand Down
3 changes: 1 addition & 2 deletions custom-deploy-steps/get-image-uri/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ runs:
shell: bash
id: get-image-uri
run: |
# For testing purposes ( actual value: =master-${{ github.sha }} )
imageTag=$(echo ${{ github.ref_name }} | awk '{print tolower($0)}' | sed -e 's|/|-|g')
imageTag=master-${{ github.sha }}
IMAGE_TAGS=$(
aws ecr describe-images \
--repository-name ${{ inputs.ecr_repository }} \
Expand Down

0 comments on commit 921f49a

Please sign in to comment.