Amazon ECR source action reference
Triggers the pipeline when a new image is pushed to the Amazon ECR repository. This action provides an image definitions file referencing the URI for the image that was pushed to Amazon ECR. This source action is often used in conjunction with another source action, such as CodeCommit, to allow a source location for all other source artifacts. For more information, see Tutorial: Create a pipeline with an Amazon ECR source and ECS-to-CodeDeploy deployment.
When you use the console to create or edit your pipeline, CodePipeline creates a CloudWatch Events rule that starts your pipeline when a change occurs in the repository.
You must have already created an Amazon ECR repository and pushed an image before you connect the pipeline through an Amazon ECR action.
Topics
Action type
-
Category:
Source
-
Owner:
AWS
-
Provider:
ECR
-
Version:
1
Configuration parameters
- RepositoryName
-
Required: Yes
The name of the Amazon ECR repository where the image was pushed.
- ImageTag
-
Required: No
The tag used for the image.
Note
If a value for
ImageTag
is not specified, the value defaults tolatest
.
Input artifacts
-
Number of artifacts:
0
-
Description: Input artifacts do not apply for this action type.
Output artifacts
-
Number of artifacts:
1
-
Description: This action produces an artifact that contains an
imageDetail.json
file that contains the URI for the image that triggered the pipeline execution. For information about theimageDetail.json
file, see imageDetail.json file for Amazon ECS blue/green deployment actions.
Output variables
When configured, this action produces variables that can be referenced by the action configuration of a downstream action in the pipeline. This action produces variables which can be viewed as output variables, even if the action doesn't have a namespace. You configure an action with a namespace to make those variables available to the configuration of downstream actions.
For more information, see Variables reference.
- RegistryId
-
The AWS account ID associated with the registry that contains the repository.
- RepositoryName
-
The name of the Amazon ECR repository where the image was pushed.
- ImageTag
-
The tag used for the image.
- ImageDigest
-
The
sha256
digest of the image manifest. - ImageURI
-
The URI for the image.
Action declaration (Amazon ECR example)
See also
The following related resources can help you as you work with this action.
-
Tutorial: Create a pipeline with an Amazon ECR source and ECS-to-CodeDeploy deployment – This tutorial provides a sample app spec file and sample CodeDeploy application and deployment group to create a pipeline with a CodeCommit and Amazon ECR source that deploys to Amazon ECS instances.