File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
packages/@aws-cdk/aws-codebuild Expand file tree Collapse file tree 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 {
7272 return {
7373 type : 'S3' ,
7474 location : this . props . bucket . bucketName ,
75- path : this . props . bucket . path ,
75+ path : this . props . path ,
7676 namespaceType : this . parseNamespaceType ( this . props . includeBuildID ) ,
7777 name : this . props . name ,
7878 packaging : this . parsePackaging ( this . props . packageZip ) ,
Original file line number Diff line number Diff line change @@ -466,6 +466,28 @@ export = {
466466 }
467467 } ,
468468
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+
469491 'artifacts' : {
470492 'CodePipeline' : {
471493 'both source and artifacs are set to CodePipeline' ( test : Test ) {
You can’t perform that action at this time.
0 commit comments