When using the latest version of amazon/aws-codebuild-local (DIGEST:sha256:bd69dbcdc9b3da66fd93de0b6d45534086367d6b48d3536d0248a01a459fb7e4), if my buildspec contains test reporting configuration, as defined here, the build fails with a message such as:
agent_1 | [Container] 2020/04/17 09:08:17 Runtime error (*errors.errorString: arn: invalid prefix)
I get the same error whether I use a test report name:
reports:
Tests:
files:
- application/smoke-tests/out/*.xml
Or a full arn:
reports:
reports:
arn:aws:codebuild:eu-west-1:*********:report-group/ApplicationTest-Tests:
files:
- application/smoke-tests/out/*.xml:
@StefanSmith , we do not have local agent support for test reporting currently. We will add this support in a future release.
Thanks. I understand that there is no support for test reporting yet but it seems like a bug that the presence of a reports section in the buildspec leads to an error. I would expect it to be ignored and the build to keep working.
I agree with @StefanSmith that having the report section populated should not cause the whole build to fail. It forces me to comment out the reports section when testing the buildspec file locally and then (hopefully) remember to re-enable the section prior to committing to the remote repository.
Agreed. We'll address this in the next update of the CodeBuild-local, which likely will just add this support. We'll make every attempt to support the feature in CodeBuild-local in lock step with the features on CodeBuild on AWS Cloud or in exception cases, we'll make a note to not break CodeBuild-local for a feature that isn't supported just yet.
This supported is added with https://github.com/aws/aws-codebuild-docker-images/pull/410. Please download the latest Dockerfile from https://hub.docker.com/r/amazon/aws-codebuild-local/.
Most helpful comment
Thanks. I understand that there is no support for test reporting yet but it seems like a bug that the presence of a
reportssection in the buildspec leads to an error. I would expect it to be ignored and the build to keep working.