Skip to content

Commit b1322bb

Browse files
authored
fix(aws-codebuild): correctly pass the timeout property to CFN when creating a Project. (#1071)
1 parent f32cba9 commit b1322bb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ export class Project extends ProjectRef {
523523
badgeEnabled: props.badge,
524524
cache,
525525
name: props.projectName,
526+
timeoutInMinutes: props.timeout,
526527
});
527528

528529
this.projectArn = resource.projectArn;

packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ export = {
466466
}
467467
},
468468

469-
'using path in S3 artifacts sets it correctly'(test: Test) {
469+
'using timeout and path in S3 artifacts sets it correctly'(test: Test) {
470470
const stack = new cdk.Stack();
471471
const bucket = new s3.Bucket(stack, 'Bucket');
472472
new codebuild.Project(stack, 'Project', {
@@ -475,6 +475,7 @@ export = {
475475
name: 'some_name',
476476
bucket,
477477
}),
478+
timeout: 123,
478479
});
479480

480481
expect(stack).to(haveResource('AWS::CodeBuild::Project', {
@@ -483,6 +484,7 @@ export = {
483484
"Name": "some_name",
484485
"Type": "S3",
485486
},
487+
"TimeoutInMinutes": 123,
486488
}));
487489

488490
test.done();

0 commit comments

Comments
 (0)