@@ -26,7 +26,7 @@ expected_container_definition='[\n {\n "essential": true,\n "image": "hel
2626 export BUILDKITE_PLUGIN_ECS_DEPLOY_TASK_DEFINITION=examples/hello-world.json
2727
2828 stub aws \
29- " ecs register-task-definition --family hello-world --container-definitions '\' $ expected_container_definition\' ' : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
29+ " ecs register-task-definition --family hello-world --container-definitions $' ${ expected_container_definition} ' : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
3030 " ecs describe-services --cluster my-cluster --service my-service --query 'services[?status==\` ACTIVE\` ].status' --output text : echo '1'" \
3131 " ecs describe-services --cluster my-cluster --services my-service --query 'services[?status==\` ACTIVE\` ]' : echo 'null'" \
3232 " ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
@@ -54,10 +54,10 @@ expected_container_definition='[\n {\n "essential": true,\n "image": "hel
5454 export BUILDKITE_PLUGIN_ECS_DEPLOY_IMAGE_1=hello-world:alpacas
5555 export BUILDKITE_PLUGIN_ECS_DEPLOY_TASK_DEFINITION=examples/multiple-images.json
5656
57- expected_container_definition =' [\n {\n "essential": true,\n "image": "hello-world:llamas",\n "memory": 100,\n "name": "sample",\n "portMappings": [\n {\n "containerPort": 80,\n "hostPort": 80\n }\n ]\n },\n {\n "essential": true,\n "image": "hello-world:alpacas",\n "memory": 100,\n "name": "sample",\n "portMappings": [\n {\n "containerPort": 80,\n "hostPort": 80\n }\n ]\n }\n]'
57+ expected_multiple_container_definition =' [\n {\n "essential": true,\n "image": "hello-world:llamas",\n "memory": 100,\n "name": "sample",\n "portMappings": [\n {\n "containerPort": 80,\n "hostPort": 80\n }\n ]\n },\n {\n "essential": true,\n "image": "hello-world:alpacas",\n "memory": 100,\n "name": "sample",\n "portMappings": [\n {\n "containerPort": 80,\n "hostPort": 80\n }\n ]\n }\n]'
5858
5959 stub aws \
60- " ecs register-task-definition --family hello-world --container-definitions '\' $expected_container_definition \' ' : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
60+ " ecs register-task-definition --family hello-world --container-definitions $' $expected_multiple_container_definition ' : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
6161 " ecs describe-services --cluster my-cluster --service my-service --query 'services[?status==\` ACTIVE\` ].status' --output text : echo '1'" \
6262 " ecs describe-services --cluster my-cluster --services my-service --query 'services[?status==\` ACTIVE\` ]' : echo 'null'" \
6363 " ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
@@ -86,7 +86,7 @@ expected_container_definition='[\n {\n "essential": true,\n "image": "hel
8686 export BUILDKITE_PLUGIN_ECS_DEPLOY_TASK_DEFINITION=examples/hello-world.json
8787
8888 stub aws \
89- " ecs register-task-definition --family hello-world --container-definitions '\' $expected_container_definition \' ' : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
89+ " ecs register-task-definition --family hello-world --container-definitions $' $expected_container_definition ' : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
9090 " ecs describe-services --cluster my-cluster --service my-service --query 'services[?status==\` ACTIVE\` ].status' --output text : echo -n ''" \
9191 " ecs create-service --cluster my-cluster --service-name my-service --task-definition hello-world:1 --desired-count 1 --deployment-configuration maximumPercent=200,minimumHealthyPercent=100 : echo -n ''" \
9292 " ecs describe-services --cluster my-cluster --services my-service --query 'services[?status==\` ACTIVE\` ]' : echo 'null'" \
@@ -117,7 +117,7 @@ expected_container_definition='[\n {\n "essential": true,\n "image": "hel
117117 export BUILDKITE_PLUGIN_ECS_DEPLOY_TASK_ROLE_ARN=arn:aws:iam::012345678910:role/world
118118
119119 stub aws \
120- " ecs register-task-definition --family hello-world --container-definitions '\' $expected_container_definition \' ' --task-role-arn arn:aws:iam::012345678910:role/world : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
120+ " ecs register-task-definition --family hello-world --container-definitions $' $expected_container_definition ' --task-role-arn arn:aws:iam::012345678910:role/world : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
121121 " ecs describe-services --cluster my-cluster --service my-service --query 'services[?status==\` ACTIVE\` ].status' --output text : echo '1'" \
122122 " ecs describe-services --cluster my-cluster --services my-service --query 'services[?status==\` ACTIVE\` ]' : echo 'null'" \
123123 " ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
@@ -151,7 +151,7 @@ expected_container_definition='[\n {\n "essential": true,\n "image": "hel
151151 alb_config=' [{"loadBalancers":[{"containerName":"nginx","containerPort":80,"targetGroupArn":"arn:aws:elasticloadbalancing:us-east-1:012345678910:targetgroup/alb/e987e1234cd12abc"}]}]'
152152
153153 stub aws \
154- " ecs register-task-definition --family hello-world --container-definitions '\' $expected_container_definition \' ' : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
154+ " ecs register-task-definition --family hello-world --container-definitions $' $expected_container_definition ' : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
155155 " ecs describe-services --cluster my-cluster --service my-service --query 'services[?status==\` ACTIVE\` ].status' --output text : echo -n ''" \
156156 " ecs create-service --cluster my-cluster --service-name my-service --task-definition hello-world:1 --desired-count 1 --deployment-configuration maximumPercent=200,minimumHealthyPercent=100 --load-balancers targetGroupArn=arn:aws:elasticloadbalancing:us-east-1:012345678910:targetgroup/alb/e987e1234cd12abc,containerName=nginx,containerPort=80 : echo -n ''" \
157157 " ecs describe-services --cluster my-cluster --services my-service --query 'services[?status==\` ACTIVE\` ]' : echo '$alb_config '" \
@@ -185,7 +185,7 @@ expected_container_definition='[\n {\n "essential": true,\n "image": "hel
185185 export BUILDKITE_PLUGIN_ECS_DEPLOY_TARGET_CONTAINER_PORT=80
186186
187187 stub aws \
188- " ecs register-task-definition --family hello-world --container-definitions '\' $expected_container_definition \' ' : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
188+ " ecs register-task-definition --family hello-world --container-definitions $' $expected_container_definition ' : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
189189 " ecs describe-services --cluster my-cluster --service my-service --query 'services[?status==\` ACTIVE\` ].status' --output text : echo -n ''" \
190190 " ecs create-service --cluster my-cluster --service-name my-service --task-definition hello-world:1 --desired-count 1 --deployment-configuration maximumPercent=200,minimumHealthyPercent=100 --load-balancers loadBalancerName=nginx-elb,containerName=nginx,containerPort=80 : echo -n ''" \
191191 " ecs describe-services --cluster my-cluster --services my-service --query 'services[?status==\` ACTIVE\` ]' : echo '[{\" loadBalancers\" :[{\" loadBalancerName\" : \" nginx-elb\" ,\" containerName\" : \" nginx\" ,\" containerPort\" : 80}]}]'" \
@@ -217,7 +217,7 @@ expected_container_definition='[\n {\n "essential": true,\n "image": "hel
217217 export BUILDKITE_PLUGIN_ECS_DEPLOY_EXECUTION_ROLE=arn:aws:iam::012345678910:role/world
218218
219219 stub aws \
220- " ecs register-task-definition --family hello-world --container-definitions '\' $expected_container_definition \'' : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
220+ " ecs register-task-definition --family hello-world --container-definitions $' $expected_container_definition ' --execution-role-arn arn:aws:iam::012345678910:role/world : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
221221 " ecs describe-services --cluster my-cluster --service my-service --query 'services[?status==\` ACTIVE\` ].status' --output text : echo '1'" \
222222 " ecs describe-services --cluster my-cluster --services my-service --query 'services[?status==\` ACTIVE\` ]' : echo 'null'" \
223223 " ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
@@ -247,7 +247,7 @@ expected_container_definition='[\n {\n "essential": true,\n "image": "hel
247247 export BUILDKITE_PLUGIN_ECS_DEPLOY_DEPLOYMENT_CONFIGURATION=" 0/100"
248248
249249 stub aws \
250- " ecs register-task-definition --family hello-world --container-definitions '\' $expected_container_definition \' ' : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
250+ " ecs register-task-definition --family hello-world --container-definitions $' $expected_container_definition ' : echo '{\" taskDefinition\" :{\" revision\" :1}}'" \
251251 " ecs describe-services --cluster my-cluster --service my-service --query 'services[?status==\` ACTIVE\` ].status' --output text : echo -n ''" \
252252 " ecs create-service --cluster my-cluster --service-name my-service --task-definition hello-world:1 --desired-count 1 --deployment-configuration maximumPercent=100,minimumHealthyPercent=0 : echo -n ''" \
253253 " ecs describe-services --cluster my-cluster --services my-service --query 'services[?status==\` ACTIVE\` ]' : echo 'null'" \
0 commit comments