Report processing after build failure in CodeBuild

0

We have set up a CodeBuild project using a buildspec.yml as part of a larger CodePipeline . The build phase uses on-failure: ABORT to abort the build whenever unit or integration tests fail, to prevent further assembly and deployment. Test reports are generated, and actually this is the exact scenario where they are most useful to find out exactly what went wrong. However it would appear that whenever a build fails, reports are not processed, and the logs actually stop abruptly without mentioning any report processing at all ("Preparing to copy TEST report ...").

This is usually treated as an edge case in other CI systems, and usually requires some form of conditional or exception processing (a finally clause), but I haven't been able to find definite documentation on this, one way or the other, for CodeBuild. Amazon Q is very adamant that the reports are always processed, but that is not the behaviour we're observing:

If the build fails, CodeBuild will still generate the test report and store it in the specified report group. You can then view the test report details in the CodeBuild console or programmatically access the report using the AWS CLI or SDK.

Have you run into this issue? Is there any documentation about report processing on aborted builds?

profile picture
asked 14 days ago69 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions