Commit 9374642 1 parent fe0b057 commit 9374642 Copy full SHA for 9374642
File tree 4 files changed +18
-5
lines changed
packages/@aws-cdk/aws-codebuild
4 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ The CodeBuild library supports both Linux and Windows images via the
189
189
` LinuxBuildImage ` and ` WindowsBuildImage ` classes, respectively.
190
190
191
191
You can either specify one of the predefined Windows/Linux images by using one
192
- of the constants such as ` WindowsBuildImage.WIN_SERVER_CORE_2016_BASE ` or
192
+ of the constants such as ` WindowsBuildImage.WINDOWS_BASE_2_0 ` or
193
193
` LinuxBuildImage.STANDARD_2_0 ` .
194
194
195
195
Alternatively, you can specify a custom image using one of the static methods on
Original file line number Diff line number Diff line change @@ -1394,11 +1394,25 @@ interface WindowsBuildImageProps {
1394
1394
* @see https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
1395
1395
*/
1396
1396
export class WindowsBuildImage implements IBuildImage {
1397
+ /**
1398
+ * Corresponds to the standard CodeBuild image `aws/codebuild/windows-base:1.0`.
1399
+ *
1400
+ * @deprecated `WindowsBuildImage.WINDOWS_BASE_2_0` should be used instead.
1401
+ */
1397
1402
public static readonly WIN_SERVER_CORE_2016_BASE : IBuildImage = new WindowsBuildImage ( {
1398
1403
imageId : 'aws/codebuild/windows-base:1.0' ,
1399
1404
imagePullPrincipalType : ImagePullPrincipalType . CODEBUILD ,
1400
1405
} ) ;
1401
1406
1407
+ /**
1408
+ * The standard CodeBuild image `aws/codebuild/windows-base:2.0`, which is
1409
+ * based off Windows Server Core 2016.
1410
+ */
1411
+ public static readonly WINDOWS_BASE_2_0 : IBuildImage = new WindowsBuildImage ( {
1412
+ imageId : 'aws/codebuild/windows-base:2.0' ,
1413
+ imagePullPrincipalType : ImagePullPrincipalType . CODEBUILD ,
1414
+ } ) ;
1415
+
1402
1416
/**
1403
1417
* @returns a Windows build image from a Docker Hub image.
1404
1418
*/
Original file line number Diff line number Diff line change 176
176
" docs-public-apis:@aws-cdk/aws-codebuild.Source.gitHubEnterprise" ,
177
177
" docs-public-apis:@aws-cdk/aws-codebuild.Source.s3" ,
178
178
" docs-public-apis:@aws-cdk/aws-codebuild.StateChangeEvent.currentPhase" ,
179
- " docs-public-apis:@aws-cdk/aws-codebuild.WindowsBuildImage.WIN_SERVER_CORE_2016_BASE" ,
180
179
" docs-public-apis:@aws-cdk/aws-codebuild.WindowsBuildImage.fromDockerRegistry" ,
181
180
" docs-public-apis:@aws-cdk/aws-codebuild.WindowsBuildImage.fromEcrRepository" ,
182
181
" props-default-doc:@aws-cdk/aws-codebuild.ArtifactsProps.identifier" ,
Original file line number Diff line number Diff line change @@ -303,7 +303,7 @@ export = {
303
303
path : 'path/to/source.zip' ,
304
304
} ) ,
305
305
environment : {
306
- buildImage : codebuild . WindowsBuildImage . WIN_SERVER_CORE_2016_BASE ,
306
+ buildImage : codebuild . WindowsBuildImage . WINDOWS_BASE_2_0 ,
307
307
} ,
308
308
} ) ;
309
309
@@ -442,7 +442,7 @@ export = {
442
442
} ,
443
443
"Environment" : {
444
444
"ComputeType" : "BUILD_GENERAL1_MEDIUM" ,
445
- "Image" : "aws/codebuild/windows-base:1 .0" ,
445
+ "Image" : "aws/codebuild/windows-base:2 .0" ,
446
446
"PrivilegedMode" : false ,
447
447
"Type" : "WINDOWS_CONTAINER"
448
448
} ,
@@ -1280,7 +1280,7 @@ export = {
1280
1280
'using ComputeType.Small with a Windows image fails validation' ( test : Test ) {
1281
1281
const stack = new cdk . Stack ( ) ;
1282
1282
const invalidEnvironment : codebuild . BuildEnvironment = {
1283
- buildImage : codebuild . WindowsBuildImage . WIN_SERVER_CORE_2016_BASE ,
1283
+ buildImage : codebuild . WindowsBuildImage . WINDOWS_BASE_2_0 ,
1284
1284
computeType : codebuild . ComputeType . SMALL ,
1285
1285
} ;
1286
1286
You can’t perform that action at this time.
0 commit comments