SDLC Automation

A CodeBuild health-check wrapper pipes probe output through a logging utility and then performs cleanup; unhealthy probes currently produce successful builds. Which changes together preserve failure detection while retaining logging and cleanup? (Choose three.)

Choose 3 answers

Show the answer

Correct answersA. Enable shell pipefail behavior for the probe-and-logging pipeline.B. Save the pipeline status before cleanup and return it afterward.E. Make the probe return a nonzero status for an unhealthy application.

AWhy this is right: Pipefail prevents a successful logging utility from masking a failed probe in the pipeline.

BWhy this is right: Saving and returning the pipeline status prevents successful cleanup from replacing the health-check result.

CWhy not this: Successful cleanup could mask an unhealthy application's failed probe.

DWhy not this: A report exposes results but does not restore an exit status masked by logging or cleanup.

EWhy this is right: A nonzero probe status gives the shell a failure signal when application health checks fail.

The probe must signal failure, pipefail must preserve that failure through the logging pipeline, and the wrapper must retain it across cleanup. Publishing a report provides visibility but does not repair a masked process exit status.