diff --git a/.github/workflows/test-workflow.yml b/.github/workflows/test-workflow.yml index 1acb08de4..f7fd261da 100644 --- a/.github/workflows/test-workflow.yml +++ b/.github/workflows/test-workflow.yml @@ -24,11 +24,33 @@ jobs: 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 + with: + task-definition: task-definition-run-task.json + cluster: github-actions-deploy-task-def-integ-test + run-task: true + run-task-subnets: subnet-e5604fce, subnet-fe9355b4, subnet-c49431bc, subnet-392f9b64 + run-task-security-groups: sg-067ebcde49c0f3ad8 + run-task-launch-type: FARGATE + 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 + with: + task-definition: task-definition-run-task.json + cluster: github-actions-deploy-task-def-integ-test + run-task: true + run-task-subnets: subnet-e5604fce, subnet-fe9355b4, subnet-c49431bc, subnet-392f9b64 + run-task-security-groups: sg-067ebcde49c0f3ad8 + run-task-launch-type: FARGATE + wait-for-task-stopped: true - - name: Deploy Amazon ECS task definition + - name: Deploy Amazon ECS task definition with ECS Service uses: aws-actions/amazon-ecs-deploy-task-definition@abe77ebded86b685c231c58bd5936280c6fcc011 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 + wait-for-service-stability: true \ No newline at end of file diff --git a/task-definition-run-task.json b/task-definition-run-task.json new file mode 100644 index 000000000..79589ffaa --- /dev/null +++ b/task-definition-run-task.json @@ -0,0 +1,25 @@ +{ + "containerDefinitions": [ + { + "memory": 32, + "essential": true, + "entryPoint": ["ping"], + "name": "alpine_ping", + "readonlyRootFilesystem": true, + "image": "alpine:3.4", + "command": [ + "-c", + "4", + "example.com" + ], + "cpu": 16 + } + ], + "memory": "512", + "family": "github-actions-deploy-task-def-integ-tests", + "requiresCompatibilities": [ + "FARGATE" + ], + "networkMode": "awsvpc", + "cpu": "256" +} diff --git a/test-workflow.yml b/test-workflow.yml index 288591211..8f42d01db 100644 --- a/test-workflow.yml +++ b/test-workflow.yml @@ -25,10 +25,32 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-west-2 - - name: Deploy Amazon ECS task definition + - 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@v1 + with: + task-definition: task-definition-run-task.json + cluster: github-actions-deploy-task-def-integ-test + run-task: true + run-task-subnets: subnet-e5604fce, subnet-fe9355b4, subnet-c49431bc, subnet-392f9b64 + run-task-security-groups: sg-067ebcde49c0f3ad8 + run-task-launch-type: FARGATE + 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@v1 + with: + task-definition: task-definition-run-task.json + cluster: github-actions-deploy-task-def-integ-test + run-task: true + run-task-subnets: subnet-e5604fce, subnet-fe9355b4, subnet-c49431bc, subnet-392f9b64 + run-task-security-groups: sg-067ebcde49c0f3ad8 + 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@v1 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 + wait-for-service-stability: true \ No newline at end of file