ReportGroupProps

class aws_cdk.aws_codebuild.ReportGroupProps(*, export_bucket=None, removal_policy=None, report_group_name=None, type=None, zip_export=None)

Bases: object

Construction properties for ReportGroup.

Parameters:
  • export_bucket (Optional[IBucket]) – An optional S3 bucket to export the reports to. Default: - the reports will not be exported

  • removal_policy (Optional[RemovalPolicy]) – 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. Default: RemovalPolicy.RETAIN

  • report_group_name (Optional[str]) – The physical name of the report group. Default: - CloudFormation-generated name

  • type (Optional[ReportGroupType]) – 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. Default: TEST

  • zip_export (Optional[bool]) – 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. Default: - false (the files will not be ZIPped)

ExampleMetadata:

infused

Example:

# source: codebuild.Source


# create a new ReportGroup
report_group = codebuild.ReportGroup(self, "ReportGroup",
    type=codebuild.ReportGroupType.CODE_COVERAGE
)

project = codebuild.Project(self, "Project",
    source=source,
    build_spec=codebuild.BuildSpec.from_object({
        # ...
        "reports": {
            "report_group.report_group_arn": {
                "files": "**/*",
                "base-directory": "build/coverage-report.xml",
                "file-format": "JACOCOXML"
            }
        }
    })
)

Attributes

export_bucket

An optional S3 bucket to export the reports to.

Default:
  • the reports will not be exported

removal_policy

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.

Default:

RemovalPolicy.RETAIN

report_group_name

The physical name of the report group.

Default:
  • CloudFormation-generated name

type

.

  • TEST - The report group contains test reports.

  • CODE_COVERAGE - The report group contains code coverage reports.

Default:

TEST

Type:

The type of report group. This can be one of the following values

zip_export

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.

Default:
  • false (the files will not be ZIPped)