Skip to content

Trigger CodePipeline with any tag pushed in the source ECR repository

0

I have a CodePipeline with ECR as the source, and I want it to trigger every time a new image is pushed to ECR, regardless of the image tag, and deploy it to ECS. However, ECR as a source in CodePipeline only allows me to select a specific image tag. I want the pipeline to deploy any image pushed with any tag, and I also want the flexibility to rerun the pipeline with a specific image tag in the future if I need to revert to a particular image version.

1 Answer
2

Hi,

Please, look at this page: https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-ECR.html#action-reference-ECR-config

ImageTag
Required: No

The tag used for the image.

Note
If a value for ImageTag is not specified, the value defaults to latest.

So, you don't have to specify a tag to trigger the pipeline: "latest" (automatically generated by the system) will then be used by default.

Best,

Didier

EXPERT
answered a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.