
Answer-first summary for fast verification
Answer: Create a Cloud Build build config file with separate cloud builder steps to compile and execute unit and integration tests.
To ensure that the build history clearly displays the stage at which the build failed, it's essential to have separate steps for each task in the Cloud Build configuration. This approach allows for granular visibility into the build process, making it easy to identify exactly where a failure occurred. Option D is the correct choice because it involves creating a Cloud Build build config file with separate steps for compiling and executing unit and integration tests. This method ensures that if any step fails, the build history will clearly indicate the specific stage of failure, unlike the other options which either combine steps or do not provide clear failure stage identification.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are using Cloud Build to build a Docker image and need to modify the build process to execute unit and integration tests. You want the build history to clearly indicate the stage where the build failed in case of a failure.
What should you do?
A
Add RUN commands in the Dockerfile to execute unit and integration tests.
B
Create a Cloud Build build config file with a single build step to compile unit and integration tests.
C
Create a Cloud Build build config file that will spawn a separate cloud build pipeline for unit and integration tests.
D
Create a Cloud Build build config file with separate cloud builder steps to compile and execute unit and integration tests.
No comments yet.