Skip to content

Commit

Permalink
Use the correct option for describe-services
Browse files Browse the repository at this point in the history
  • Loading branch information
toote committed Mar 13, 2024
1 parent 7fc4f2b commit 5d9c44f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion hooks/command
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ aws ecs wait services-stable \
service_events=$(aws ecs describe-services \
${aws_default_args[@]+"${aws_default_args[@]}"} \
--cluster "${cluster}" \
--service "${service_name}" \
--services "${service_name}" \
--query 'services[].events' --output text)

if [[ $deploy_exitcode -eq 0 ]]; then
Expand Down
12 changes: 6 additions & 6 deletions tests/command.bats
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ setup() {
"ecs register-task-definition --family hello-world --container-definitions \* : echo '{\"taskDefinition\":{\"revision\":1}}'" \
"ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
"ecs wait services-stable --cluster my-cluster --services my-service : echo ok" \
"ecs describe-services --cluster my-cluster --service my-service --query 'services[].events' --output text : echo ok"
"ecs describe-services --cluster my-cluster --services my-service --query 'services[].events' --output text : echo ok"

run "$PWD/hooks/command"

Expand All @@ -43,7 +43,7 @@ setup() {
"ecs register-task-definition --family hello-world --container-definitions $'$expected_multiple_container_definition' : echo '{\"taskDefinition\":{\"revision\":1}}'" \
"ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
"ecs wait services-stable --cluster my-cluster --services my-service : echo ok" \
"ecs describe-services --cluster my-cluster --service my-service --query 'services[].events' --output text : echo ok"
"ecs describe-services --cluster my-cluster --services my-service --query 'services[].events' --output text : echo ok"

run "$PWD/hooks/command"

Expand All @@ -69,7 +69,7 @@ setup() {
"ecs register-task-definition --family hello-world --container-definitions \* : echo \"\$6\" > ${_TMP_DIR}/container_definition ; echo '{\"taskDefinition\":{\"revision\":1}}'" \
"ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
"ecs wait services-stable --cluster my-cluster --services my-service : echo ok" \
"ecs describe-services --cluster my-cluster --service my-service --query 'services[].events' --output text : echo ok"
"ecs describe-services --cluster my-cluster --services my-service --query 'services[].events' --output text : echo ok"

run "$PWD/hooks/command"

Expand All @@ -96,7 +96,7 @@ setup() {
"ecs register-task-definition --family hello-world --container-definitions \* --task-role-arn arn:aws:iam::012345678910:role/world : echo '{\"taskDefinition\":{\"revision\":1}}'" \
"ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
"ecs wait services-stable --cluster my-cluster --services my-service : echo ok" \
"ecs describe-services --cluster my-cluster --service my-service --query 'services[].events' --output text : echo ok"
"ecs describe-services --cluster my-cluster --services my-service --query 'services[].events' --output text : echo ok"

run "$PWD/hooks/command"

Expand All @@ -114,7 +114,7 @@ setup() {
"ecs register-task-definition --family hello-world --container-definitions \* --execution-role-arn arn:aws:iam::012345678910:role/world : echo '{\"taskDefinition\":{\"revision\":1}}'" \
"ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
"ecs wait services-stable --cluster my-cluster --services my-service : echo ok" \
"ecs describe-services --cluster my-cluster --service my-service --query 'services[].events' --output text : echo ok"
"ecs describe-services --cluster my-cluster --services my-service --query 'services[].events' --output text : echo ok"

run "$PWD/hooks/command"

Expand All @@ -133,7 +133,7 @@ setup() {
"ecs register-task-definition --region custom-region --family hello-world --container-definitions \* : echo '{\"taskDefinition\":{\"revision\":1}}'" \
"ecs update-service --region custom-region --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
"ecs wait services-stable --region custom-region --cluster my-cluster --services my-service : echo ok" \
"ecs describe-services --region custom-region --cluster my-cluster --service my-service --query 'services[].events' --output text : echo ok"
"ecs describe-services --region custom-region --cluster my-cluster --services my-service --query 'services[].events' --output text : echo ok"

run "$PWD/hooks/command"

Expand Down
2 changes: 1 addition & 1 deletion tests/deprecated-options.bats
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ setup() {
"ecs register-task-definition --family hello-world --container-definitions \* : echo '{\"taskDefinition\":{\"revision\":1}}'" \
"ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
"ecs wait services-stable --cluster my-cluster --services my-service : echo ok" \
"ecs describe-services --cluster my-cluster --service my-service --query 'services[].events' --output text : echo ok"
"ecs describe-services --cluster my-cluster --services my-service --query 'services[].events' --output text : echo ok"

run "$PWD/hooks/command"

Expand Down
10 changes: 5 additions & 5 deletions tests/existing-data.bats
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ setup() {
"ecs register-task-definition --family hello-world --container-definitions \* : echo '{\"taskDefinition\":{\"revision\":1}}'" \
"ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
"ecs wait services-stable --cluster my-cluster --services my-service : echo ok" \
"ecs describe-services --cluster my-cluster --service my-service --query 'services[].events' --output text : echo ok"
"ecs describe-services --cluster my-cluster --services my-service --query 'services[].events' --output text : echo ok"

run "$PWD/hooks/command"

Expand All @@ -39,7 +39,7 @@ setup() {
"ecs register-task-definition --family hello-world --container-definitions \* : echo '{\"taskDefinition\":{\"revision\":1}}'" \
"ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
"ecs wait services-stable --cluster my-cluster --services my-service : echo ok" \
"ecs describe-services --cluster my-cluster --service my-service --query 'services[].events' --output text : echo ok"
"ecs describe-services --cluster my-cluster --services my-service --query 'services[].events' --output text : echo ok"

run "$PWD/hooks/command"

Expand All @@ -63,7 +63,7 @@ setup() {
"ecs register-task-definition --family hello-world --container-definitions \* : echo \"\$6\" > ${_TMP_DIR}/container_definition ; echo '{\"taskDefinition\":{\"revision\":1}}'" \
"ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
"ecs wait services-stable --cluster my-cluster --services my-service : echo ok" \
"ecs describe-services --cluster my-cluster --service my-service --query 'services[].events' --output text : echo ok"
"ecs describe-services --cluster my-cluster --services my-service --query 'services[].events' --output text : echo ok"

run "$PWD/hooks/command"

Expand All @@ -90,7 +90,7 @@ setup() {
"ecs register-task-definition --family hello-world --container-definitions \* --task-role-arn arn:aws:iam::012345678910:role/world : echo '{\"taskDefinition\":{\"revision\":1}}'" \
"ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
"ecs wait services-stable --cluster my-cluster --services my-service : echo ok" \
"ecs describe-services --cluster my-cluster --service my-service --query 'services[].events' --output text : echo ok"
"ecs describe-services --cluster my-cluster --services my-service --query 'services[].events' --output text : echo ok"

run "$PWD/hooks/command"

Expand All @@ -108,7 +108,7 @@ setup() {
"ecs register-task-definition --family hello-world --container-definitions \* --execution-role-arn arn:aws:iam::012345678910:role/world : echo '{\"taskDefinition\":{\"revision\":1}}'" \
"ecs update-service --cluster my-cluster --service my-service --task-definition hello-world:1 : echo ok" \
"ecs wait services-stable --cluster my-cluster --services my-service : echo ok" \
"ecs describe-services --cluster my-cluster --service my-service --query 'services[].events' --output text : echo ok"
"ecs describe-services --cluster my-cluster --services my-service --query 'services[].events' --output text : echo ok"

run "$PWD/hooks/command"

Expand Down

0 comments on commit 5d9c44f

Please sign in to comment.