diff --git a/packages/aws-cdk-lib/aws-codebuild/lib/project.ts b/packages/aws-cdk-lib/aws-codebuild/lib/project.ts index 213f90b28b2ec..8f32928af4965 100644 --- a/packages/aws-cdk-lib/aws-codebuild/lib/project.ts +++ b/packages/aws-cdk-lib/aws-codebuild/lib/project.ts @@ -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', @@ -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', @@ -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. */ diff --git a/packages/aws-cdk-lib/aws-codebuild/test/project.test.ts b/packages/aws-cdk-lib/aws-codebuild/test/project.test.ts index d64fbf27b5397..fa4c3bceedcfe 100644 --- a/packages/aws-cdk-lib/aws-codebuild/test/project.test.ts +++ b/packages/aws-cdk-lib/aws-codebuild/test/project.test.ts @@ -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();