Skip to content

Commit

Permalink
feat(deploy-ecs/deploy.sh): add group to task definition publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
firestack committed Apr 26, 2024
1 parent 71f04ad commit 0219bb6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions deploy-ecs/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ if [ "${REQUIRES_SECRETS}" = true ] && (echo "${newcontainers}" | jq '.[0] | .se
exit 1
fi

echo "Publishing new ${LAUNCH_TYPE} task definition."
echo "::group::Publishing new ${LAUNCH_TYPE} task definition."
if [ "${LAUNCH_TYPE}" = "FARGATE" ]; then
aws ecs register-task-definition \
--family "${ECS_TASK_DEF}" \
Expand All @@ -103,10 +103,11 @@ elif [ "${LAUNCH_TYPE}" = "EC2" ] || [ "${LAUNCH_TYPE}" = "EXTERNAL" ]; then
--volumes "$(echo "${taskdefinition}" | jq '.taskDefinition.volumes')" \
--placement-constraints "$(echo "${taskdefinition}" | jq '.taskDefinition.placementConstraints')"
else
echo "::endgroup::"
echo "Error: expected 'FARGATE', 'EC2', or 'EXTERNAL' launch-type, got ${LAUNCH_TYPE}"
exit 1
fi

echo "::endgroup::" # publishing task definition

newrevision="$(aws ecs describe-task-definition --task-definition "${ECS_TASK_DEF}" | \
jq -r '.taskDefinition.revision')"
Expand Down

0 comments on commit 0219bb6

Please sign in to comment.