Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added region while describing the task definition using ecs #207

Merged
merged 3 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/commands/update_service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ steps:
--task-definition << parameters.family >> \
--output text \
--query 'taskDefinition.taskDefinitionArn' \
--profile=<< parameters.profile_name >>)
--profile << parameters.profile_name >> \
--region ${AWS_DEFAULT_REGION})
echo "export CCI_ORB_AWS_ECS_REGISTERED_TASK_DFN='${TASK_DEFINITION_ARN}'" >> $BASH_ENV
- when:
condition: << parameters.task_definition_tags >>
Expand Down
3 changes: 2 additions & 1 deletion src/examples/verify_revision_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ usage:
--task_definition ${MY_APP_PREFIX}-service \
--output text \
--query 'taskDefinition.taskDefinitionArn' \
--profile default)
--profile default \
--region ${AWS_DEFAULT_REGION})
echo "export TASK_DEFINITION_ARN='${TASK_DEFINITION_ARN}'" >>
$BASH_ENV
- aws-ecs/verify_revision_is_deployed:
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/get_prev_task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
fi

# shellcheck disable=SC2034
PREVIOUS_TASK_DEFINITION="$(aws ecs describe-task-definition --task-definition "${ECS_TASK_DEFINITION_NAME}" --include TAGS --profile "${ORB_STR_PROFILE_NAME}" "$@")"
PREVIOUS_TASK_DEFINITION="$(aws ecs describe-task-definition --task-definition "${ECS_TASK_DEFINITION_NAME}" --include TAGS --profile "${ORB_STR_PROFILE_NAME}" --region "${AWS_DEFAULT_REGION}" "$@")"

# Prepare script for updating container definitions

Expand Down
3 changes: 3 additions & 0 deletions src/scripts/verify_revision_is_deployed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,23 @@ do
--profile "${ORB_STR_PROFILE_NAME}" \
--cluster "$ORB_STR_CLUSTER_NAME" \
--services "${ORB_STR_SERVICE_NAME}" \
--region "${AWS_DEFAULT_REGION}" \
--output text \
--query 'services[0].deployments[].[taskDefinition, status]' \
"$@")
NUM_DEPLOYMENTS=$(aws ecs describe-services \
--profile "${ORB_STR_PROFILE_NAME}" \
--cluster "$ORB_STR_CLUSTER_NAME" \
--services "${ORB_STR_SERVICE_NAME}" \
--region "${AWS_DEFAULT_REGION}" \
--output text \
--query 'length(services[0].deployments)' \
"$@")
TARGET_REVISION=$(aws ecs describe-services \
--profile "${ORB_STR_PROFILE_NAME}" \
--cluster "$ORB_STR_CLUSTER_NAME" \
--services "${ORB_STR_SERVICE_NAME}" \
--region "${AWS_DEFAULT_REGION}" \
--output text \
--query "services[0].deployments[?taskDefinition==\`$ORB_STR_TASK_DEF_ARN\` && runningCount == desiredCount && (status == \`PRIMARY\` || status == \`ACTIVE\`)][taskDefinition]" \
"$@")
Expand Down