Create a report group (Amazon CloudFormation)
To create a test report using the Amazon CloudFormation template
You can use an Amazon CloudFormation template file to create and provision a report group. For more information, see Amazon CloudFormation User Guide.
The following Amazon CloudFormation YAML template creates a report group that does not export raw test result files.
Resources: CodeBuildReportGroup: Type: AWS::CodeBuild::ReportGroup Properties: Name:
my-report-group-name
Type: TEST ExportConfig: ExportConfigType: NO_EXPORT
The following Amazon CloudFormation YAML template creates a report group that exports raw test result files to an Amazon S3 bucket.
Resources: CodeBuildReportGroup: Type: AWS::CodeBuild::ReportGroup Properties: Name:
my-report-group-name
Type: TEST ExportConfig: ExportConfigType: S3 S3Destination: Bucket:my-s3-bucket-name
Path:path-to-folder-for-exported-files
Packaging: ZIP EncryptionKey:my-KMS-encryption-key
EncryptionDisabled: false
The CodeBuild service role specified in the project is used for permissions to upload to the S3 bucket.