Skip to content
v2.275.0

ReportGroupProps Struct ​

Construction properties for ReportGroup.

Example ​

ts
declare const source: codebuild.Source;

// create a new ReportGroup
const reportGroup = new codebuild.ReportGroup(this, 'ReportGroup', {
    type: codebuild.ReportGroupType.CODE_COVERAGE
});

const project = new codebuild.Project(this, 'Project', {
  source,
  buildSpec: codebuild.BuildSpec.fromObject({
    // ...
    reports: {
      [reportGroup.reportGroupArn]: {
        files: '**/*',
        'base-directory': 'build/coverage-report.xml',
        'file-format': 'JACOCOXML'
      },
    },
  }),
});

Properties ​

deleteReportsoptionalbooleandelete_reportsoptionalbooldeleteReportsoptionalBooleanDeleteReportsoptionalboolDeleteReportsoptional*bool= false#
If true, deleting the report group force deletes the contents of the report group.

If false, the report group must be empty before attempting to delete it.

exportBucketoptionalIBucketexport_bucketoptionalIBucketexportBucketoptionalIBucketExportBucketoptionalIBucketExportBucketoptionalIBucket#
An optional S3 bucket to export the reports to.

Default: the reports will not be exported

removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy= RemovalPolicy.RETAIN#
What to do when this resource is deleted from a stack.

As CodeBuild does not allow deleting a ResourceGroup that has reports inside of it, this is set to retain the resource by default.

reportGroupNameoptionalstringreport_group_nameoptionalstrreportGroupNameoptionalStringReportGroupNameoptionalstringReportGroupNameoptional*string#
The physical name of the report group.

Default: CloudFormation-generated name

typeoptionalReportGroupTypetypeoptionalReportGroupTypetypeoptionalReportGroupTypeTypeoptionalReportGroupTypeTypeoptionalReportGroupType= TEST#
The type of report group. This can be one of the following values:.
  • TEST - The report group contains test reports.
  • CODE_COVERAGE - The report group contains code coverage reports.
zipExportoptionalbooleanzip_exportoptionalboolzipExportoptionalBooleanZipExportoptionalboolZipExportoptional*bool#
Whether to output the report files into the export bucket as-is, or create a ZIP from them before doing the export.

Default: false (the files will not be ZIPped)

Ignored if exportBucket has not been provided.