2020
2121 - name : Print current build ID
2222 run : |
23- echo Integration test run: githubactionsamazonecsdeplo-NWcjHIgDJLXw:40568610-9158-4254-9c73-b3c9302d0db6
23+ echo Integration test run: githubactionsamazonecsdeplo-NWcjHIgDJLXw:fc351f9e-8675-4597-ad0a-2474408cd183
2424
2525 - name : Configure AWS credentials
2626 uses : aws-actions/configure-aws-credentials@v4
3030 aws-region : us-west-2
3131
3232 - name : Deploy Amazon ECS task definition with one-off task and wait for task stopped set to false
33- uses : aws-actions/amazon-ecs-deploy-task-definition@d46c585e6f666913d6b0bac36d4f2f88184b9454
33+ uses : aws-actions/amazon-ecs-deploy-task-definition@cc7d054d9dcfe5d3264f391b0562aa84486781f4
3434 with :
3535 task-definition : task-definition-run-task.json
3636 cluster : github-actions-deploy-task-def-integ-test
4242 wait-for-task-stopped : false
4343
4444 - name : Deploy Amazon ECS task definition with one-off task and wait for task stopped set to true
45- uses : aws-actions/amazon-ecs-deploy-task-definition@d46c585e6f666913d6b0bac36d4f2f88184b9454
45+ uses : aws-actions/amazon-ecs-deploy-task-definition@cc7d054d9dcfe5d3264f391b0562aa84486781f4
4646 with :
4747 task-definition : task-definition-run-task.json
4848 cluster : github-actions-deploy-task-def-integ-test
5454 wait-for-task-stopped : true
5555 enable-ecs-managed-tags : true
5656
57+ - name : Deploy bad image to test rollback detection
58+ id : bad-deploy
59+ continue-on-error : true
60+ uses : aws-actions/amazon-ecs-deploy-task-definition@cc7d054d9dcfe5d3264f391b0562aa84486781f4
61+ with :
62+ task-definition : task-definition-bad-image.json
63+ service : github-actions-deploy-task-def-integ-test
64+ cluster : github-actions-deploy-task-def-integ-test
65+ wait-for-service-stability : true
66+
67+ - name : Verify rollback was detected
68+ run : |
69+ if [ "${{ steps.bad-deploy.outcome }}" != "failure" ]; then
70+ echo "::error::Expected deployment to fail due to rollback detection, but outcome was: ${{ steps.bad-deploy.outcome }}"
71+ exit 1
72+ fi
73+ echo "Rollback correctly detected"
74+
5775 - name : Deploy Amazon ECS task definition with ECS Service
58- uses : aws-actions/amazon-ecs-deploy-task-definition@d46c585e6f666913d6b0bac36d4f2f88184b9454
76+ uses : aws-actions/amazon-ecs-deploy-task-definition@cc7d054d9dcfe5d3264f391b0562aa84486781f4
5977 with :
6078 task-definition : task-definition.json
6179 service : github-actions-deploy-task-def-integ-test
6482 enable-ecs-managed-tags : true
6583
6684 - name : Deploy Amazon ECS task definition with ECS Service VolumeConfiguration
67- uses : aws-actions/amazon-ecs-deploy-task-definition@d46c585e6f666913d6b0bac36d4f2f88184b9454
85+ uses : aws-actions/amazon-ecs-deploy-task-definition@cc7d054d9dcfe5d3264f391b0562aa84486781f4
6886 with :
6987 task-definition : task-definition-volume-configuration.json
7088 service : github-actions-deploy-task-def-integ-test
7593 service-managed-ebs-volume : ' {"filesystemType":"xfs","roleArn":"arn:aws:iam::${{secrets.AWS_ACCOUNT_ID}}:role/GitHubActionsVolumeConfigurationsEBSRole","encrypted":false,"sizeInGiB":30}'
7694
7795 - name : Deploy Amazon ECS task definition with one-off task and VolumeConfiguration
78- uses : aws-actions/amazon-ecs-deploy-task-definition@d46c585e6f666913d6b0bac36d4f2f88184b9454
96+ uses : aws-actions/amazon-ecs-deploy-task-definition@cc7d054d9dcfe5d3264f391b0562aa84486781f4
7997 with :
8098 task-definition : task-definition-run-task-volume-configuration.json
8199 cluster : github-actions-deploy-task-def-integ-test
87105 run-task-managed-ebs-volume-name : " ebs1"
88106 run-task-managed-ebs-volume : ' {"filesystemType":"xfs","roleArn":"arn:aws:iam::${{secrets.AWS_ACCOUNT_ID}}:role/GitHubActionsVolumeConfigurationsEBSRole","encrypted":false,"sizeInGiB":30}'
89107 run-task-started-by : " GitHub-Actions-EBS-Test"
90- wait-for-task-stopped : true
108+ wait-for-task-stopped : true
0 commit comments