new ECS task definition based on a local JSON
Problem to solve
After we deliver #218841 (closed), we want to make it easy to create local task revisions and push them to AWS. Our current solution only allows pushing existing revisions that are already located in AWS ECS, but it is very likely that users would want to create new task definitions from their local machine and push them.
Today, the ECS template updates existing task definitions (by making a copy of an existing task definition and then creating a new revision of this task definition based on this copy - only the docker image location of the app changes) users deploying to ECS can only connect to task definitions which are already defined in their attached AWS account.
However - when updating your application it's common for users to also update their task-definition as part of their GitLab flow. This issue makes it possible to update the .json task definition in your local repository and push it knowing that the task will get appropriately created in your AWS account as part of your standard development flow.
User experience goal
User should be able to create a new ECS task definition based on a local JSON file.
The local JSON file shall be located in the root folder of the the user's project (say a
<project_root>/ci/aws folder) and the
.gitlab-ci.yml will call it from that absolute/relative location.
We will place an example JSON in the location of the ECS template We should add documentation about the best practice of this file location and how to change the relative path.
We should update the deploy_ecs docker image (will effect
template: AWS/Deploy-ECS.gitlab-ci.yml) so that users can create a new task definition based on a local JSON file
- aws-ecs/update-task-definition-from-json: task-definition-json: my-app-definition.json
The JSON file can be located in the repo or defined in a file-typed CI_AWS_ECS_TASK_DEFINITION_FILE variable
deploy_ecs.ymltemplate and/or deploy_ecs docker image
- Create documentation on how to use the template/autoDevOps
- Add an example JSON to the documentation