File tree 2 files changed +23
-1
lines changed
packages/@aws-cdk/aws-codebuild
2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ export class S3BucketBuildArtifacts extends BuildArtifacts {
72
72
return {
73
73
type : 'S3' ,
74
74
location : this . props . bucket . bucketName ,
75
- path : this . props . bucket . path ,
75
+ path : this . props . path ,
76
76
namespaceType : this . parseNamespaceType ( this . props . includeBuildID ) ,
77
77
name : this . props . name ,
78
78
packaging : this . parsePackaging ( this . props . packageZip ) ,
Original file line number Diff line number Diff line change @@ -466,6 +466,28 @@ export = {
466
466
}
467
467
} ,
468
468
469
+ 'using path in S3 artifacts sets it correctly' ( test : Test ) {
470
+ const stack = new cdk . Stack ( ) ;
471
+ const bucket = new s3 . Bucket ( stack , 'Bucket' ) ;
472
+ new codebuild . Project ( stack , 'Project' , {
473
+ artifacts : new codebuild . S3BucketBuildArtifacts ( {
474
+ path : 'some/path' ,
475
+ name : 'some_name' ,
476
+ bucket,
477
+ } ) ,
478
+ } ) ;
479
+
480
+ expect ( stack ) . to ( haveResource ( 'AWS::CodeBuild::Project' , {
481
+ "Artifacts" : {
482
+ "Path" : "some/path" ,
483
+ "Name" : "some_name" ,
484
+ "Type" : "S3" ,
485
+ } ,
486
+ } ) ) ;
487
+
488
+ test . done ( ) ;
489
+ } ,
490
+
469
491
'artifacts' : {
470
492
'CodePipeline' : {
471
493
'both source and artifacs are set to CodePipeline' ( test : Test ) {
You can’t perform that action at this time.
0 commit comments