Browse Source

feat: update pipeline to deploy sidekiq to aws

pull/1899/head
Chirag-Bhatti 1 year ago
parent
commit
32f3db87ec
  1. 27
      .github/workflows/aws_deploy.yml

27
.github/workflows/aws_deploy.yml

@ -129,13 +129,20 @@ jobs:
succeeded=$(aws ecs describe-tasks --cluster $cluster --tasks $id --query "tasks[0].stopCode == 'EssentialContainerExited' && to_string(tasks[0].containers[0].exitCode) == '0'")
if [ $succeeded == true ]; then exit 0; else exit 1; fi
- name: Download service task definition
- name: Download app service task definition
env:
app_task_definition: ${{ inputs.aws_resource_prefix }}-app
run: |
aws ecs describe-task-definition --task-definition $app_task_definition --query taskDefinition > app-task-definition.json
- name: Update image ID
- name: Download sidekiq service task definition
env:
app_task_definition: ${{ inputs.aws_resource_prefix }}-sidekiq
run: |
aws ecs describe-task-definition --task-definition $app_task_definition --query taskDefinition > sidekiq-task-definition.json
- name: Update app image ID
id: app-task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
@ -143,6 +150,14 @@ jobs:
container-name: app
image: ${{ env.image }}
- name: Update sidekiq image ID
id: sidekiq-task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: sidekiq-task-definition.json
container-name: sidekiq
image: ${{ env.image }}
- name: Deploy updated application
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
@ -150,3 +165,11 @@ jobs:
service: ${{ inputs.aws_resource_prefix }}
task-definition: ${{ steps.app-task-def.outputs.task-definition }}
wait-for-service-stability: true
- name: Deploy updated sidekiq
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
cluster: ${{ inputs.aws_resource_prefix }}
service: ${{ inputs.aws_resource_prefix }}-sidekiq
task-definition: ${{ steps.sidekiq-task-def.outputs.task-definition }}
wait-for-service-stability: true

Loading…
Cancel
Save