From 01c79e935df92e59c9fda0a4d32d68ac9c1b1dac Mon Sep 17 00:00:00 2001 From: Sherlyn Date: Wed, 31 Jul 2024 16:39:09 -0400 Subject: [PATCH] Update test-workflow.yml --- .github/workflows/test-workflow.yml | 48 +++++++++++++++++------------ 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test-workflow.yml b/.github/workflows/test-workflow.yml index cc9f593e6..919f9cd2d 100644 --- a/.github/workflows/test-workflow.yml +++ b/.github/workflows/test-workflow.yml @@ -3,6 +3,15 @@ on: branches: - integ-tests +env: + AWS_REGION: us-east-1 + ECR_REPOSITORY: one-off-input + ECS_SERVICE: app-testing-service04 + ECS_CLUSTER: one-off-cluster01 + ECS_TASK_DEFINITION: task-definition.json + ECS_TASK_DEFINITION_RUN_TASK: task-definition-run-task.json + CONTAINER_NAME: app + name: Integration Test jobs: @@ -16,43 +25,42 @@ jobs: - name: Print current build ID run: | - echo Integration test run: githubactionsamazonecsdeplo-NWcjHIgDJLXw:ecb0a69e-514e-4d6c-b21e-dda87ed159e4 - + echo Integration test run: githubactionsamazonecsdeplo-NWcjHIgDJLXw:73193632-fdb5-4eea-b8b8-7c9afb374ce0 - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-west-2 - - - name: Deploy Amazon ECS task definition with one-off task and wait for task stopped set to false - uses: aws-actions/amazon-ecs-deploy-task-definition@abe77ebded86b685c231c58bd5936280c6fcc011 + aws-region: us-east-1 + + - name: Deploy Amazon ECS task definition With Wait For Task Stopped Being False + uses: shesaave/amazon-ecs-deploy-task-definition@c279797b5851a4a8e05656a935b4847778fecd44 with: task-definition: task-definition-run-task.json - cluster: github-actions-deploy-task-def-integ-test + cluster: ${{ env.ECS_CLUSTER }} run-task: true - run-task-subnets: subnet-e5604fce, subnet-fe9355b4, subnet-c49431bc, subnet-392f9b64 + run-task-subnets: subnet-0b55b050c50fa69fc, subnet-0e6bad97ae3070da7, subnet-04f946511ec06f6cc, subnet-06135d9ae548a05c3 run-task-assign-public-IP: ENABLED - run-task-security-groups: sg-067ebcde49c0f3ad8 + run-task-security-groups: sg-09039e6de81d27e9c run-task-launch-type: FARGATE - wait-for-task-stopped: false + wait-for-task-stopped: false - - name: Deploy Amazon ECS task definition with one-off task and wait for task stopped set to true - uses: aws-actions/amazon-ecs-deploy-task-definition@abe77ebded86b685c231c58bd5936280c6fcc011 + - name: Deploy Amazon ECS task definition With Wait For Task Stopped Being True + uses: shesaave/amazon-ecs-deploy-task-definition@c279797b5851a4a8e05656a935b4847778fecd44 with: task-definition: task-definition-run-task.json - cluster: github-actions-deploy-task-def-integ-test + cluster: ${{ env.ECS_CLUSTER }} run-task: true - run-task-subnets: subnet-e5604fce, subnet-fe9355b4, subnet-c49431bc, subnet-392f9b64 + run-task-subnets: subnet-0b55b050c50fa69fc, subnet-0e6bad97ae3070da7, subnet-04f946511ec06f6cc, subnet-06135d9ae548a05c3 run-task-assign-public-IP: ENABLED - run-task-security-groups: sg-067ebcde49c0f3ad8 + run-task-security-groups: sg-09039e6de81d27e9c run-task-launch-type: FARGATE wait-for-task-stopped: true - - name: Deploy Amazon ECS task definition with ECS Service - uses: aws-actions/amazon-ecs-deploy-task-definition@abe77ebded86b685c231c58bd5936280c6fcc011 + - name: Deploy Amazon ECS task definition + uses: aws-actions/amazon-ecs-deploy-task-definition@1a69daea10712415b65b5c90f8c41b1b6b556ab5 with: task-definition: task-definition.json - service: github-actions-deploy-task-def-integ-test - cluster: github-actions-deploy-task-def-integ-test - wait-for-service-stability: true \ No newline at end of file + service: ${{ env.ECS_SERVICE }} + cluster: ${{ env.ECS_CLUSTER }} + wait-for-service-stability: true