# ReportGroupProps

Construction properties for `ReportGroup`.

Extends: ReportGroupProps
Used as props by: ReportGroup

- Source: [`aws-codebuild/lib/report-group.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-codebuild/lib/report-group.ts#L94)
- Type last changed: v2.143.0 · 24 May 2024

## 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

- `deleteReports`: boolean = 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.

- `exportBucket`: [IBucket](/cdk/api/v2/docs/aws-cdk-lib.aws_s3.IBucket.html) — An optional S3 bucket to export the reports to.

  **Default:** the reports will not be exported

- `removalPolicy`: [RemovalPolicy](/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) = 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.

- `reportGroupName`: string — The physical name of the report group.

  **Default:** CloudFormation-generated name

- `type`: [ReportGroupType](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.ReportGroupType.html) = 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.

- `zipExport`: boolean — 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.
