From 1585f7d520e6cc24e202c4146e6c86ddf114e75d Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Wed, 7 Feb 2024 22:47:23 -0500 Subject: [PATCH] Add flag to copy tags into new task definitions --- infrastructure/prod/redeploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/prod/redeploy.sh b/infrastructure/prod/redeploy.sh index e3c135af7..c658d20e9 100755 --- a/infrastructure/prod/redeploy.sh +++ b/infrastructure/prod/redeploy.sh @@ -55,7 +55,7 @@ for service_index in "${!DEPLOY_INDEXES[@]}"; do TASK_FAMILY="${TASK_FAMILIES[$i]}" SERVICE="${SERVICES[$i]}" # fetch template for task definition - TASK_DEFINITION=$(aws ecs describe-task-definition --task-definition "$TASK_FAMILY" --region "$AWS_DEFAULT_REGION") + TASK_DEFINITION=$(aws ecs describe-task-definition --task-definition "$TASK_FAMILY" --region "$AWS_DEFAULT_REGION") --include "TAGS" # update the template's image to use the latest ECR_IMAGE NEW_TASK_DEFINITION=$(echo $TASK_DEFINITION | jq --arg IMAGE "$ECR_IMAGE" '.taskDefinition | .containerDefinitions[0].image = $IMAGE | del(.taskDefinitionArn) | del(.revision) | del(.status) | del(.requiresAttributes) | del(.compatibilities) | del(.registeredAt) | del(.registeredBy)') # register the new revision for the task definition