Skip to content

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

@katrinevr412

Description

@katrinevr412

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-codebuildRelated to AWS CodeBuildeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.feature/coverage-gapGaps in CloudFormation coverage by L2 constructsgood first issueRelated to contributions. See CONTRIBUTING.mdp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions