[AWS ECS deploy] Support for patching task definitions

Krzysztof Sierszeń November 3, 2021

It would be a nice feature if one could provide a patch for an existing task definition rather than complete JSON in AWS ECS pipe's`TASK_DEFINITION`

A valid use case would be to bump the Docker image version for a container definition of a task without touching anything else. I guess one could easily find other use cases, though. 

Such a feature could be implemented in the form of a `TASK_DEFINITON_MODE=patch|overwrite' flag, with the implementation for `patch` being sth like 

TASK_DEFINITION=`aws ecs describe-task-definition --task-definition ${name} | json-patch -p ${TASK_DEFINITION}`

 

2 answers

0 votes
Oleksandr Kyrdan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 26, 2023

Hi @Krzysztof Sierszeń

Thank your for your question!

It could be your case to use FORCE_NEW_DEPLOYMENT variable:

Whether to force a new deployment of the service. Default: false. Use this option if you need to trigger a new deployment with no service definition changes: if your updated Docker image uses the same tag as what is in the existing task definition for your service (for example, my_image:latest ).

script:
  - pipe: atlassian/aws-ecs-deploy:1.11.0
    variables:
      AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
      AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
      AWS_DEFAULT_REGION: 'us-east-1'
      CLUSTER_NAME: 'my-ecs-cluster'
      SERVICE_NAME: 'my-ecs-service'
      FORCE_NEW_DEPLOYMENT: 'true'

related question Deploy to AWS ECS without Task Defintion.

 

Best regards,
Oleksandr Kyrdan

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 5, 2021

@Krzysztof Sierszeń  hi. Thanks for your idea. We will investigate about that and notify you if this feature becomes available.

 

Regards, Igor

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events