Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Professional Cloud Developer Exam - Topic 4 Question 116 Discussion

Actual exam question for Google's Professional Cloud Developer exam
Question #: 116
Topic #: 4
[All Professional Cloud Developer Questions]

You are using Cloud Build to build a Docker image. You need to modify the build to execute unit and run

integration tests. When there is a failure, you want the build history to clearly display the stage at which the

build failed.

What should you do?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

0/2000 characters
Alyce
1 day ago
Haha, I bet the answer involves using the `gcloud` command-line tool. That's always the solution, isn't it?
upvoted 0 times
...
Bok
7 days ago
Isn't there a way to set up custom build steps to run the tests and handle the failure reporting?
upvoted 0 times
...
Val
12 days ago
The `--status=FAILURE` option should give us the stage where the build failed.
upvoted 0 times
...
Lemuel
17 days ago
I think we should use the `--failure-detail` flag to get more information on the build failure.
upvoted 0 times
...
Twana
22 days ago
I think we should use the `--fail-fast` option or something similar to stop the build on the first failure, but I’m not 100% clear on how that integrates with Cloud Build.
upvoted 0 times
...
Truman
27 days ago
I’m a bit confused about how to handle failures in the build process. Do we need to set up a specific command to fail the build if the tests don’t pass?
upvoted 0 times
...
Gladys
2 months ago
I remember practicing a similar question where we had to set up different build steps. We might need to use the `steps` section to define the test commands.
upvoted 0 times
...
Leah
2 months ago
I think we need to add a step in the Cloud Build configuration to run the tests after the image is built, but I'm not entirely sure how to specify that in the YAML file.
upvoted 0 times
...
Pamella
2 months ago
I'm a bit confused on how to set the 'failure_condition' properly. I'll need to double-check the syntax and make sure I'm handling any test failures correctly.
upvoted 0 times
...
Brandee
2 months ago
Good idea, Michael. That way the build history will clearly show where the build failed. I'm going to try that approach and see if I can get it working.
upvoted 0 times
...
Elly
2 months ago
Okay, I think I've got a plan. I'll add a 'test' step that runs the unit and integration tests, and then set the 'failure_condition' property to indicate that the build should fail if any of the tests fail.
upvoted 0 times
...
Elmer
3 months ago
Hmm, I'm not sure how to set that up in Cloud Build. I'll need to review the documentation on the available build steps and how to configure them.
upvoted 0 times
...
Rodolfo
3 months ago
This seems straightforward. I'd start by adding a test stage to the build config to run the unit and integration tests.
upvoted 0 times
...

Save Cancel