Hi Team,
I'm using aws ecr Atlassian pipe for build and push the image to ecr repo. And using aws ecs deploy Atlassian pipe for deploying the ecs, but my doubt is how to rollback to old image?
Please suggest or share the bitbucketpipeline.
Hi @venkatp and welcome to the community!
First, you need to find the Pipelines build that pushed the old version of the image (the one that you want to roll back to).
If the step that pushes the image is a deployment step, there will be an option Redeploy next to the step name. You can select that to redeploy the old version of the image. Alternatively, you can select the Deployments page on the Bibtucket repo, select the name of the Deployment environment you use for this step, and you will see a list with all deployments to this environment. If you select the 3 dots next to the older build you want to redeploy, you will see the option Redeploy.
If the step that pushes the image is not a deployment step, then you can rerun the whole pipeline by selecting the Rerun option.
Kind regards,Theodora
Thanks for your answer! I don't see the redeploy option and if I click rerun it's building new docker image and updating with new not taking old image.
I could see ecr repo old image tag is dot
Please suggest or provide me the pipeline steps Thank you.
Hi Venkat,
If you rerun a pipeline (and also if you run Redeploy for a step) the build is going to execute all the commands again.
Are you rerunning an old build (that built the older version of the image you want to roll back to) or the latest build?
If you rerun an older build (the build that built an image you want to roll back to and not the newest build), doesn't it push again the older version of the image you wanted to roll back to?
Hi Thodora,
I want to rollback 1 week ago image.
Please suggest me for image versioning along with above issue, because in json file we have mentioned tag name is latest, so how we can manage image version as well thanks in advance.
Regards,
Venkat
It looks like you're new here. Sign in or register to get started.