exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 41 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 41
Topic #: 1
[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?

  • 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.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
saurabh1805
Highly Voted 3 years, 5 months ago
D is correct answer here
upvoted 11 times
...
__rajan__
Most Recent 7 months, 1 week ago
Selected Answer: D
I would go with D.
upvoted 1 times
...
omermahgoub
1 year, 3 months ago
D - Create a Cloud Build build config file with separate cloud builder steps to compile and execute unit and integration tests. This is the best option because it allows you to clearly specify and separate the different stages of the build process (compiling unit tests, executing unit tests, compiling integration tests, executing integration tests). This makes it easier to understand the build history and identify any failures that may occur. In addition, using separate build steps allows you to specify different properties (such as timeout values or environment variables) for each stage of the build process.
upvoted 1 times
...
tomato123
1 year, 8 months ago
Selected Answer: D
D is correct
upvoted 3 times
...
kinoko1330
1 year, 8 months ago
Selected Answer: D
Vote D
upvoted 1 times
...
syu31svc
2 years, 10 months ago
https://cloud.google.com/build/docs/build-config-file-schema: "A build step specifies an action that you want Cloud Build to perform. For each build step, Cloud Build executes a docker container as an instance of docker run. Build steps are analogous to commands in a script and provide you with the flexibility of executing arbitrary instructions in your build." D makes the most sense here
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago