-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(codebuild): ARM images have the wrong type and compute kind #5541
Conversation
As it turns out, ARM images require specifying a different type than Linux images. They also only work with ComputeType.LARGE. Add a new, module-private, class of IBuildImage, ArmImage, that implements that behavior and validation, and change LinuxBuildImage.AMAZON_LINUX_2_ARM to use the new class. Fixes aws#5517
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
public static readonly AMAZON_LINUX_2 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:1.0'); | ||
public static readonly AMAZON_LINUX_2_2 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:2.0'); | ||
public static readonly AMAZON_LINUX_2_ARM = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-aarch64-standard:1.0'); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the usage of LinuxBuildImage and ArmBuildImage different? One uses a static method and one uses a constructor... lets normalize.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because we don't want to expose the fact that LinuxBuildImage
is the implementation used for methods like LinuxBuildImage.codeBuildImage()
, LinuxBuildImage. fromDockerRegistry()
, etc. - that's why the constructor of LinuxBuildImage
is private. We don't need to do the same for ArmBuildImage
, as that entire class is module-private already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good
Thank you for contributing! Your pull request is now being automatically merged. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request is now being automatically merged. |
As it turns out, ARM images require specifying a different type than Linux images. They also only work with
ComputeType.LARGE
. Add a new, module-private, class ofIBuildImage
,ArmImage
,that implements that behavior and validation, and change
LinuxBuildImage.AMAZON_LINUX_2_ARM
to use the new class.Fixes #5517
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license