-
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
Can't Override BuildEnvironment.type to "ARM_CONTAINER" #5517
Comments
UPDATE: temporary workaround confirmed by adding below "escape hatch" provisions after codebuild.Project(...) is instantiated:
This is now appropriately provisioning an ARM_CONTAINER and build is executing appropriately. |
Thanks for reporting @canada4663 ! I'm glad you were able to unblock yourself. Apparently, we missed the fact that you need to override the |
awesome and thanks. |
For Arm builds, the If anyone is looking for a workaround with a const armTestProject = new codebuild.PipelineProject(this, 'linux-arm64', {
buildSpec: myBuildSpec,
environment: {
buildImage: codebuild.LinuxBuildImage.AMAZON_LINUX_2_ARM,
computeType: codebuild.ComputeType.LARGE
}
})
const cfnArmTestProject = armTestProject.node.defaultChild as codebuild.CfnProject
cfnArmTestProject.addOverride('Properties.Environment.Type','ARM_CONTAINER') |
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
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 #5517 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@skinny85 the associated PR didn't fix the underlying problem here. The workaround in #5517 (comment) is still required for using |
@shellscape #5541 was specifically about fixing If you need a If you open a Pull Request with that simple change, I'm sure you can quickly get it in the next CDK release. |
There is no way to set the BuildEnvironment type setting so that you can set environment type to ARM_CONTAINER and use an ARM based build container, even when you set the build image to the ARM container.
Reproduction Steps
Error Log
Upon inspecting the console, it is using the LINUX_CONTAINER instance sizes for ComputeType: BUILD_GENERAL1_LARGE - 15GB and 8vCPU, instead of 16GB and 8vCPU
When inspecting the underlying code you can see that type is hardcoded to "LINUX_CONTAINER" and there is no way to override it.
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: