A DevOps engineer uses a code repository with automated pipelines. The engineer wants all new submissions to trigger a build that stops if tests fail, and the logs must be kept for later review. Which method achieves this goal?
Remove testing from the pipeline and rely on external tools to scrutinize the compiled code
Include a stage that runs test tasks and blocks progression upon failure while preserving output in the pipeline
Rely on local checks by each contributor, then manually upload logs after changes are merged
Set up a weekly job that executes builds and deletes log data after confirming success
Allocating a dedicated phase that runs tests and blocks further tasks when something fails will ensure errors are caught before merging. Preserving logs allows teams to diagnose issues accurately. Timed jobs or manual steps lose efficiency, and skipping the test phase forfeits automated oversight, making it harder to detect problems.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a code repository and why is it used in DevOps?
Open an interactive chat with Bash
How do automated pipelines contribute to DevOps efficiency?
Open an interactive chat with Bash
What are the benefits of keeping logs in automated pipelines?