Skip to content

Commit

Permalink
chore: add new windows build image (aws#29358)
Browse files Browse the repository at this point in the history
Adding the newest build image for windows.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
TheRealAmazonKendra authored Mar 5, 2024
1 parent a7fac9d commit 0605a8b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/aws-cdk-lib/aws-codebuild/lib/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1995,7 +1995,7 @@ export class WindowsBuildImage implements IBuildImage {
/**
* Corresponds to the standard CodeBuild image `aws/codebuild/windows-base:1.0`.
*
* @deprecated `WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_2_0` should be used instead.
* @deprecated `WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_3_0` should be used instead.
*/
public static readonly WIN_SERVER_CORE_2016_BASE: IBuildImage = new WindowsBuildImage({
imageId: 'aws/codebuild/windows-base:1.0',
Expand All @@ -2006,7 +2006,7 @@ export class WindowsBuildImage implements IBuildImage {
* The standard CodeBuild image `aws/codebuild/windows-base:2.0`, which is
* based off Windows Server Core 2016.
*
* @deprecated `WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_2_0` should be used instead.
* @deprecated `WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_3_0` should be used instead.
*/
public static readonly WINDOWS_BASE_2_0: IBuildImage = new WindowsBuildImage({
imageId: 'aws/codebuild/windows-base:2.0',
Expand All @@ -2033,6 +2033,16 @@ export class WindowsBuildImage implements IBuildImage {
imageType: WindowsImageType.SERVER_2019,
});

/**
* The standard CodeBuild image `aws/codebuild/windows-base:2019-3.0`, which is
* based off Windows Server Core 2019.
*/
public static readonly WIN_SERVER_CORE_2019_BASE_3_0: IBuildImage = new WindowsBuildImage({
imageId: 'aws/codebuild/windows-base:2019-3.0',
imagePullPrincipalType: ImagePullPrincipalType.CODEBUILD,
imageType: WindowsImageType.SERVER_2019,
});

/**
* @returns a Windows build image from a Docker Hub image.
*/
Expand Down
1 change: 1 addition & 0 deletions packages/aws-cdk-lib/aws-codebuild/test/project.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
])('has build image for %s', (_, buildImage, expected) => {
// GIVEN
const stack = new cdk.Stack();
Expand Down

0 comments on commit 0605a8b

Please sign in to comment.