Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- aws --version
- aws configure set default.region us-west-2
- aws configure set default.output json
- echo "preparing task definition"
- aws ecs describe-task-definition --task-definition applications | ./jq --arg x $CIRCLE_SHA1 ' .taskDefinition
- | del(.status)
- | del(.taskDefinitionArn)
- | del(.revision)
- | .containerDefinitions[0].image = ("<DOCKER-REPO>/<DOCKER-IMAGE>:"+$x)' > new-task-definition.json
- NEW_REVISION=$(aws ecs register-task-definition --cli-input-json file://new-task-definition.json | ./jq '.taskDefinition.revision')
- echo "updating service definition"
- aws ecs update-service --cluster <CLUSTER-NAME> --service <SERVICE-NAME> --task-definition "applications:$NEW_REVISION"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement