aws-cdk-lib.aws_codebuild.ReportGroupProps

interface ReportGroupProps

LanguageType name
.NETAmazon.CDK.AWS.CodeBuild.ReportGroupProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodebuild#ReportGroupProps
Javasoftware.amazon.awscdk.services.codebuild.ReportGroupProps
Pythonaws_cdk.aws_codebuild.ReportGroupProps
TypeScript (source)aws-cdk-lib » aws_codebuild » ReportGroupProps

Construction properties for ReportGroup.

Example

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

NameTypeDescription
exportBucket?IBucketAn optional S3 bucket to export the reports to.
removalPolicy?RemovalPolicyWhat to do when this resource is deleted from a stack.
reportGroupName?stringThe physical name of the report group.
type?ReportGroupTypeThe type of report group. This can be one of the following values:.
zipExport?booleanWhether to output the report files into the export bucket as-is, or create a ZIP from them before doing the export.

exportBucket?

Type: IBucket (optional, default: the reports will not be exported)

An optional S3 bucket to export the reports to.


removalPolicy?

Type: RemovalPolicy (optional, default: 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?

Type: string (optional, default: CloudFormation-generated name)

The physical name of the report group.


type?

Type: ReportGroupType (optional, default: 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?

Type: boolean (optional, default: false (the files will not be ZIPped))

Whether to output the report files into the export bucket as-is, or create a ZIP from them before doing the export.

Ignored if exportBucket has not been provided.