Skip to content

Commit 0605a8b

Browse files
chore: add new windows build image (#29358)
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*
1 parent a7fac9d commit 0605a8b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

packages/aws-cdk-lib/aws-codebuild/lib/project.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -1995,7 +1995,7 @@ export class WindowsBuildImage implements IBuildImage {
19951995
/**
19961996
* Corresponds to the standard CodeBuild image `aws/codebuild/windows-base:1.0`.
19971997
*
1998-
* @deprecated `WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_2_0` should be used instead.
1998+
* @deprecated `WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_3_0` should be used instead.
19991999
*/
20002000
public static readonly WIN_SERVER_CORE_2016_BASE: IBuildImage = new WindowsBuildImage({
20012001
imageId: 'aws/codebuild/windows-base:1.0',
@@ -2006,7 +2006,7 @@ export class WindowsBuildImage implements IBuildImage {
20062006
* The standard CodeBuild image `aws/codebuild/windows-base:2.0`, which is
20072007
* based off Windows Server Core 2016.
20082008
*
2009-
* @deprecated `WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_2_0` should be used instead.
2009+
* @deprecated `WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_3_0` should be used instead.
20102010
*/
20112011
public static readonly WINDOWS_BASE_2_0: IBuildImage = new WindowsBuildImage({
20122012
imageId: 'aws/codebuild/windows-base:2.0',
@@ -2033,6 +2033,16 @@ export class WindowsBuildImage implements IBuildImage {
20332033
imageType: WindowsImageType.SERVER_2019,
20342034
});
20352035

2036+
/**
2037+
* The standard CodeBuild image `aws/codebuild/windows-base:2019-3.0`, which is
2038+
* based off Windows Server Core 2019.
2039+
*/
2040+
public static readonly WIN_SERVER_CORE_2019_BASE_3_0: IBuildImage = new WindowsBuildImage({
2041+
imageId: 'aws/codebuild/windows-base:2019-3.0',
2042+
imagePullPrincipalType: ImagePullPrincipalType.CODEBUILD,
2043+
imageType: WindowsImageType.SERVER_2019,
2044+
});
2045+
20362046
/**
20372047
* @returns a Windows build image from a Docker Hub image.
20382048
*/

packages/aws-cdk-lib/aws-codebuild/test/project.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,7 @@ describe('Environment', () => {
798798
['Amazon Linux 4.0', codebuild.LinuxBuildImage.AMAZON_LINUX_2_4, 'aws/codebuild/amazonlinux2-x86_64-standard:4.0'],
799799
['Amazon Linux 5.0', codebuild.LinuxBuildImage.AMAZON_LINUX_2_5, 'aws/codebuild/amazonlinux2-x86_64-standard:5.0'],
800800
['Windows Server Core 2019 2.0', codebuild.WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_2_0, 'aws/codebuild/windows-base:2019-2.0'],
801+
['Windows Server Core 2019 3.0', codebuild.WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_3_0, 'aws/codebuild/windows-base:2019-3.0'],
801802
])('has build image for %s', (_, buildImage, expected) => {
802803
// GIVEN
803804
const stack = new cdk.Stack();

0 commit comments

Comments
 (0)