Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(pipelines): Add support for Amazon ECR source action #16378

Closed
1 of 2 tasks
alexpulver opened this issue Sep 4, 2021 · 4 comments · Fixed by #16385
Closed
1 of 2 tasks

(pipelines): Add support for Amazon ECR source action #16378

alexpulver opened this issue Sep 4, 2021 · 4 comments · Fixed by #16385
Labels
@aws-cdk/aws-ecr Related to Amazon Elastic Container Registry @aws-cdk/pipelines CDK Pipelines library effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@alexpulver
Copy link
Contributor

alexpulver commented Sep 4, 2021

Add Amazon ECR source action to pipelines.CodePipelineSource class.

Use Case

Pipelines that trigger on push to Amazon ECR repository (e.g., base image update due to security CVE)

Proposed Solution

Add pipelines.CodePipelineSource.ecr(...) factory method.

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@alexpulver alexpulver added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 4, 2021
@github-actions github-actions bot added @aws-cdk/aws-ecr Related to Amazon Elastic Container Registry @aws-cdk/pipelines CDK Pipelines library labels Sep 4, 2021
@rix0rrr rix0rrr added effort/small Small work item – less than a day of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Sep 29, 2021
@rix0rrr rix0rrr removed their assignment Sep 29, 2021
@madeline-k madeline-k removed their assignment Nov 24, 2021
@npvisual
Copy link

npvisual commented Dec 1, 2021

@alexpulver : thanks for doing this 🙏. Been racking my brain trying to find a way around the limitation of CDK Pipeline sources for a little while. Glad I found your RFE !

Quick question : how would you trigger the CDK self-mutating pipeline from both a source code repo change and an ECR repo change ? Couldn't tell from the PR #16385

Since the pipeline needs to watch for changes in its own code, the primary source has to be the source code repo, I'd guess. But then how would you add the ECR repo source ? The current parameters in ShellStep define additional_inputs but that just seems to fit another source code repo.

@stockf
Copy link

stockf commented Dec 13, 2021

additional_inputs works. The pipeline ist then also triggered when a new image is pushed.

@npvisual
Copy link

@stockf : thanks for the response. Agreed. I tested this with a "local" implementation of the changes provided in the PR and it works like a charm. Here's the snipper in Python :

        build_step = pipelines.ShellStep(
            "Synth",
            input=code_source,
            additional_inputs={
                "ecr_artifact": ecr_source,
            },
           ...

The source stage of the pipeline will have both actions defined in parallel and the pipeline will get triggered for either an update to the source code or the ECR repo.

@mergify mergify bot closed this as completed in #16385 Feb 24, 2022
mergify bot pushed a commit that referenced this issue Feb 24, 2022
Closes #16378 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecr Related to Amazon Elastic Container Registry @aws-cdk/pipelines CDK Pipelines library effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants