How can I configure CodeBuild to use a ReportGroup created by CloudFormation?
AWS have recently (20/12/19) released support for shared CodeBuild Report Groups in CloudFormation.
I’d like to use a ReportGroup in my CloudFormation, but I can’t find a way to configure CodeBuild to use it.
It looks like reporting configuration is done in the buildspec, with an example of a hardcoded reference to a report group in this example buildspec snippet:
reports:
arn:aws:codebuild:your-region:your-aws-account-id:report-group/report-group-name-1: #surefire junit reports
files:
- '**/*'
base-directory: 'surefire/target/surefire-reports'
discard-paths: false
If I’m creating my ReportGroup via CloudFormation, I don’t know the ARN to put into the buildspec.
So, my question is how can I inject a dynamically created ReportGroup ARN into the buildspec? Or is there a different/better way of configuring CodeBuild to use a ReportGroup created by CloudFormation?