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

(codebuild): allow LinuxGpuBuildImage to directly reference an image from any ECR repository #16500

Closed
2 tasks
katrinevr412 opened this issue Sep 15, 2021 · 2 comments · Fixed by #17170
Closed
2 tasks
Labels
@aws-cdk/aws-codebuild Related to AWS CodeBuild effort/small Small work item – less than a day of effort feature/coverage-gap Gaps in CloudFormation coverage by L2 constructs feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p1

Comments

@katrinevr412
Copy link

katrinevr412 commented Sep 15, 2021

This is to bring feature parity between LinuxBuildImage (https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-codebuild.LinuxBuildImage.html#static-fromwbrecrwbrrepositoryrepository-tag) and LinuxGpuBuildImage (https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-codebuild.LinuxGpuBuildImage.html).

Specifically, add the fromEcrRepository method in this class.

Use Case

Currently need to hack around this constraint to obtain an Linux GPU build image using a customised ECR repository. We would like a direct way to declare this as in LinuxBuildImage, i.e.

const myRepository: IRepository = ecr.Repository.fromRepositoryArn(this, "<some ID>", "<some repository ARN>");
// this works for LinuxBuildImage but I want LINUX_GPU
return LinuxGpuBuildImage.fromEcrRepository(myRepository, "latest");

Proposed Solution

Add a fromEcrRepository method in LinuxGpuBuildImage similar to the one in LinuxBuildImage to hook up with the underlying Cfn classes.

Other

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

This is a 🚀 Feature Request

@katrinevr412 katrinevr412 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 15, 2021
@github-actions github-actions bot added the @aws-cdk/aws-ecr Related to Amazon Elastic Container Registry label Sep 15, 2021
@skinny85 skinny85 added @aws-cdk/aws-codebuild Related to AWS CodeBuild effort/small Small work item – less than a day of effort feature/coverage-gap Gaps in CloudFormation coverage by L2 constructs good first issue Related to contributions. See CONTRIBUTING.md p1 and removed needs-triage This issue or PR still needs to be triaged. @aws-cdk/aws-ecr Related to Amazon Elastic Container Registry labels Sep 15, 2021
@github-actions github-actions bot added the @aws-cdk/aws-ecr Related to Amazon Elastic Container Registry label Sep 15, 2021
@skinny85 skinny85 changed the title LinuxGpuBuildImage: add feature to directly import image from an arbitrary ECR repository (codebuild): allow LinuxGpuBuildImage to directly reference an image from any ECR repository Sep 15, 2021
@skinny85 skinny85 removed the @aws-cdk/aws-ecr Related to Amazon Elastic Container Registry label Sep 15, 2021
@iRoachie
Copy link
Contributor

@KatrinaYang2302 I took a stab at this in #17170. Let me know if it's what you were intending.

@mergify mergify bot closed this as completed in #17170 Oct 28, 2021
mergify bot pushed a commit that referenced this issue Oct 28, 2021
Resolves #16500


----

*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.

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Feb 21, 2022
Resolves aws#16500


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-codebuild Related to AWS CodeBuild effort/small Small work item – less than a day of effort feature/coverage-gap Gaps in CloudFormation coverage by L2 constructs feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants