Way to simply update the container name and tag in task definition
See original GitHub issueCircleCi orb has a way to only update the container name and/or tag without requiring the whole json task definition
https://circleci.com/orbs/registry/orb/circleci/aws-ecs (see container-image-name-updates
)
This isn’t supported with this action right?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Updating a task definition using the classic console
To update a task definition, create a task definition revision. If the task definition is used in a service, you must update that...
Read more >Update the container of a service in Amazon ECS - Server Fault
Upload your new container:tag to the repository · Create a new task definition referencing the new tag · Update your service to reference...
Read more >How do I deploy updated Docker images to Amazon ECS tasks?
Navigate to Task Definitions · Select the correct task · Choose create new revision · If you're already pulling the latest version of...
Read more >Task definition parameters - Amazon Elastic Container Service
The following task definition parameters are either required or used in most container definitions. Topics. Name; Image; Memory; Port mappings. Name. name. Type ......
Read more >circleci/aws-ecs@3.2.0
Use this to update the Docker image names and/or tag names of existing containers that had been defined in the previous task definition....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@clareliguori thanks for the quick response
What would be the recommended approach for ENV variables that are defined in the task definition then?
ended up doing this instead of using the action to avoid having to use a repeated task definition json in the repo (it pulls the latest one from ECS)
LATEST_TASK_DEFINITION=`aws ecs describe-task-definition --task-definition XYZ` NEW_TASK_DEFINTIION=`echo $LATEST_TASK_DEFINITION | jq '.taskDefinition | .containerDefinitions[0].image = "${{ secrets.ECR_REPOSITORY_URL }}:${{ github.sha }}" | del(.["taskDefinitionArn", "revision", "status", "requiresAttributes", "compatibilities"])'` TASK_DEFINITION_REVISION=`aws ecs register-task-definition --cli-input-json "$NEW_TASK_DEFINTIION" | jq '.taskDefinition.revision'` aws ecs update-service --cluster XYZ --service XYZ --task-definition XYZ:${TASK_DEFINITION_REVISION}