Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to auto-update existing registered task definition with specific tags?

Suppose I already have a task definition registered. The task-definition source file is not in the same repository as my code. I want to re-use the registered task definition and only update the container image tag.

 

How do I do this?

 

If the option is not supported, I suggest something like this:

IMAGE_TAGS: "<container_name>:<tag_name> <container_name>:<tag_name>"

wherein each tuple sets the tag for a specific container, incase you have a multi-container task definition.

1 answer

0 votes

@Tarek Abdel Sateryou need to use aws cli for that, to update image tag.

If you know some tags that you find your task definition by, use aws cli command describe-task-definition (by family, revision etc.) , describe it, clean up non-acceptable fields , change your image tags.

The new task definition will be registered , because you did change the tags. This how aws ecs works, if you use specific tags. (Task definition ).

If you use latest, the FORCE_NEW_DEPLOYMENT option, that we support, would help you.

 

Otherwise you will need to register task definition again, because tags has changed, by executing aws command describing task definition and constructing it again, changing only image tags. Don't forget to remove non-acceptable fields like registeredAt, updatedAt etc.

 

You can find suitable solution here  in the question thread

https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/Pipeline-failing-Unknown-parameter-in-input-quot-registeredAt/qaq-p/1585076#M4043

https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/Pipeline-failing-Unknown-parameter-in-input-quot-registeredAt/qaq-p/1585076#M4064

 

However we can think more about supporting it from the box. You also can raise a Suggestion request to component Bitbucket Pipelines - Pipes here https://jira.atlassian.com/browse/BCLOUD-13452?filter=97052

or vote for existing ones.

 

Regards, Galyna

Hi,

 

Thank you for the response. I manage the task definition using terraform in a separate repository, so storing `task-definitions.json` in the same repo is not acceptable to us, neither is using latest tag and force deploy.

For now, we're a script to fetch the current task definition from AWS and replacing the image tag with jq.

However, I think this pattern is so common that it needs to be implemented directly into the pipe. I will open a suggestion for this.

The suggestion is here: https://jira.atlassian.com/browse/BCLOUD-20949

 

I think this is a critical feature that should exist in this pipe, I was surprised it didn't.

In fact, there's already a PR for it but it seems to have been abandoned

https://bitbucket.org/atlassian/aws-ecs-deploy/pull-requests/23

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

⚡️NEW Group for Confluence Cloud Admins

Calling all Confluence Cloud Admins!  We created a new Community Group to support your unique needs as Confluence admins. This is a group where you can ask questions, access resou...

78 views 2 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you