Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to maintain image versions using Atlassian plugin in aws ecr

Venkatkp January 7, 2024

Hi Team,

How to maintain image versions using Atlassian integration plugin in aws ecr repository and how to rollback old version for Aws ecs update.

 

1. We are using aws ecr Atlassian integration plugin for build and push the docker image.

2. We are updating the ecs cluster using Atlassian integration plugin, but how to rollback to pervious version? 

If we are building and pushing image to ecr repo old image tag renamed to dot.

Please provide me the bitbucket pipeline steps for image versions and rollback steps.

1 answer

1 vote
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 9, 2024

Hello @Venkatkp and thank you for reaching out to Community!

The reason why the image you are pushing to ECR is showing with a dot (.) is likely because that image had only one tag, and this tag was removed when you pushed a new image with that tag.

For example, let's say in your first pipeline you have pushed myimage:latest  version 1 to ECR. Then in a second pipeline, you make changes to this image and push it again using the same latest tag myimage:latest version 2. Version 1 of the image will have its tag removed, and it will only be accessible by its docker image ID (digest). If version 1 of the image had other tags associated with it, it would still be accessible for those other tags that were not replaced.

With that in mind, to workaround this scenario, you could add additional tags besides `latest` when pushing to ECS :

TAGS: '0.0.1 latest'

So the image will be pushed with two tags. After an update (new image push), when `latest` tag is moved to the new image, you will still have old image with `0.0.1` tag which you can use when rolling back your ECS.

I would also suggest checking the discussion on this similar question in community

Thank you, @Venkatkp !

Patrik S 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events