-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
chore(codebuild): add support for Windows Server Core 2019 3.0 CodeBuild image #29187
Conversation
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
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.
Thanks 👍
I left some comments for adjustments
imagePullPrincipalType: ImagePullPrincipalType.CODEBUILD, | ||
imageType: WindowsImageType.SERVER_2019, | ||
}); | ||
|
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.
Can you please also add support for aws/codebuild/windows-base:2022-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.
aws/codebuild/windows-base:2022-1.0
requires an alternate configuration -- this requires reserved capacity. This should be added as a dedicated change.
I don't have time to validate that adding aws/codebuild/windows-base:2022-1.0
works correctly, so I'm not inclined to add it to this change.
@@ -798,6 +798,7 @@ describe('Environment', () => { | |||
['Amazon Linux 4.0', codebuild.LinuxBuildImage.AMAZON_LINUX_2_4, 'aws/codebuild/amazonlinux2-x86_64-standard:4.0'], | |||
['Amazon Linux 5.0', codebuild.LinuxBuildImage.AMAZON_LINUX_2_5, 'aws/codebuild/amazonlinux2-x86_64-standard:5.0'], | |||
['Windows Server Core 2019 2.0', codebuild.WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_2_0, 'aws/codebuild/windows-base:2019-2.0'], | |||
['Windows Server Core 2019 3.0', codebuild.WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_3_0, 'aws/codebuild/windows-base:2019-3.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.
Can you please also add aws/codebuild/windows-base:2019-1.0
and aws/codebuild/windows-base:2022-1.0
to this test?
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.
I've added the missing test for 2019-1.0.
I didn't add 2022-1.0 - see #29187 (comment)
Apologies, I didn't look for an existing PR before also making this change. It just merged, but it did not include the Windows 22 version because I didn't see it listed here so if you would still like to make that change we would definitely welcome it. |
Thanks @TheRealAmazonKendra , it looks like this PR is a duplicate of #29358 - I will close this PR. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue # N/A
Closes # N/A
Reason for this change
CodeBuild now has a Windows Server Core 2019 3.0 image (reference: Images), but this is not available from CDK.
Additionally:
WindowsBuildImage.WIN_SERVER_CORE_2019_BASE
was added to the testsDescription of changes
Add definition for WIN_SERVER_CORE_2019_BASE_3_0 to the CDK.
This change is similar to #22259, which added the Base 2.0 image.
Description of how you validated changes
I added a test into
packages/aws-cdk-lib/aws-codebuild/test/project.test.ts
, and ran it using the commands:The tests passed.
I also validated the change by attempting a deployment that uses it. I created a file in
packages/@aws-cdk-testing/framework-integ/test/aws-codebuild/test/sample.ts
with the contents:And then I ran
This produced a stack containing a CodeBuild project, which successfully runs using the new Base 3.0 image.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license