Skip to content

(CodePipeline-Actions): Event created from ECR-Action does not use the default value the ECR-Action is using #13818

@Kruspe

Description

@Kruspe

When creating an ECR Action, CDK creates an CloudWatch event. I was expecting it to only listen on PutImage events for the latest tag since that is the default value provided by the docs and.

Instead the event listens on every tag.

Reproduction Steps

new EcrSourceAction({
      actionName: 'Image',
      repository,
      output: imageArtifact,
      variablesNamespace: 'ImageVariables',
    });

Creates an event that triggers for all PutImages regardless of the tag.

What did you expect to happen?

new EcrSourceAction({
      actionName: 'Image',
      repository,
      output: imageArtifact,
      variablesNamespace: 'ImageVariables',
      imageTag: 'latest',
    });

The event created by this check only the latest tag but I only inserted the tag that is provided by default.

What actually happened?

The CW event listens for all PutImage calls regardless of the tag.

Environment

  • CDK CLI Version : 1.95.1 (build ed2bbe6)
  • Framework Version: 1.95.1
  • Node.js Version: 15.12.0
  • OS : BigSur 11.2.3
  • Language (Version): TypeScript (3.8.3)

Other

If the described behaviour is the desired one I can create a PR for it. :)

This is 🐛 Bug Report

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions