Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
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 138 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 138
Topic #: 1
[All Professional Cloud Developer Questions]

You are using Cloud Build for your CI/CD pipeline to complete several tasks, including copying certain files to Compute Engine virtual machines. Your pipeline requires a flat file that is generated in one builder in the pipeline to be accessible by subsequent builders in the same pipeline. How should you store the file so that all the builders in the pipeline can access it?

  • A. Store and retrieve the file contents using Compute Engine instance metadata.
  • B. Output the file contents to a file in /workspace. Read from the same /workspace file in the subsequent build step.
  • C. Use gsutil to output the file contents to a Cloud Storage object. Read from the same object in the subsequent build step.
  • D. Add a build argument that runs an HTTP POST via curl to a separate web server to persist the value in one builder. Use an HTTP GET via curl from the subsequent build step to read the value.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
scaenruy
Highly Voted 2 years, 10 months ago
I vote B https://cloud.google.com/build/docs/build-config-file-schema
upvoted 10 times
...
thewalker
Most Recent 2 months, 2 weeks ago
Selected Answer: C
Cloud Storage is designed for this: Cloud Storage is a robust, scalable, and reliable object storage service. It's perfect for storing files that need to be accessed by multiple parts of your CI/CD pipeline. Shared access: Cloud Storage objects can be accessed by any builder in your pipeline, as long as they have the necessary permissions. Simplicity: Using gsutil to interact with Cloud Storage is straightforward and well-documented.
upvoted 1 times
thewalker
2 months, 2 weeks ago
A. Store and retrieve the file contents using Compute Engine instance metadata: Instance metadata is primarily for managing the instance itself, not for sharing data between builders in a pipeline. B. Output the file contents to a file in /workspace. Read from the same /workspace file in the subsequent build step: This approach is limited to the current build step. If the build step is restarted, the file in /workspace will be lost. D. Add a build argument that runs an HTTP POST via curl to a separate web server to persist the value in one builder. Use an HTTP GET via curl from the subsequent build step to read the value: This is overly complex and introduces unnecessary dependencies on external services.
upvoted 1 times
...
...
purushi
1 year, 3 months ago
Selected Answer: B
Correct answer is B. Save your flat file under /workspace folder and hence the same file can be used for other build steps. Very simple and straight forward approach though. :)
upvoted 1 times
...
Pime13
1 year, 9 months ago
Selected Answer: B
I vote B https://cloud.google.com/build/docs/build-config-file-schema
upvoted 1 times
...
omermahgoub
1 year, 10 months ago
Selected Answer: B
The best approach is to output the file contents to a file in /workspace directory in one build step and read from the same /workspace file in the subsequent build step . This way, the file is easily accessible by all builders in the pipeline as they all run in the same environment and share the same file system. And it's the easiest and simplest way of sharing the file between the builds in the pipeline.
upvoted 1 times
...
zellck
1 year, 11 months ago
Selected Answer: B
B is the answer. https://cloud.google.com/build/docs/configuring-builds/pass-data-between-steps#passing_data_using_workspaces To pass data between build steps, store the assets produced by the build step in /workspace and these assets will be available to any subsequent build steps.
upvoted 1 times
...
TNT87
1 year, 12 months ago
https://cloud.google.com/build/docs/configuring-builds/pass-data-between-steps#passing_data_using_workspaces https://cloud.google.com/build/docs/configuring-builds/pass-data-between-steps
upvoted 1 times
TNT87
1 year, 12 months ago
Answer B
upvoted 1 times
...
...
cstempo
2 years ago
B is wrong https://cloud.google.com/build/docs/build-config-file-schema Use the dir field in a build step to set a working directory to use when running the step's container. If you set the dir field in the build step, the working directory is set to /workspace/<dir>. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may NOT be persisted across build step executions
upvoted 1 times
TNT87
2 years ago
Ans B is correct https://cloud.google.com/build/docs/configuring-builds/pass-data-between-steps#passing_data_using_workspaces
upvoted 1 times
...
TNT87
1 year, 12 months ago
whatsa your answer then
upvoted 1 times
...
[Removed]
2 years ago
did you take the exam recently?
upvoted 1 times
...
...
tomato123
2 years, 3 months ago
Selected Answer: B
B is correct
upvoted 2 times
...
nehaxlpb
2 years, 4 months ago
Selected Answer: B
To pass data between build steps, store the assets produced by the build step in /workspace and these assets will be available to any subsequent build steps.
upvoted 1 times
...
americoleonardo
2 years, 6 months ago
Selected Answer: B
agree with b
upvoted 1 times
...
mbenhassine1986
2 years, 6 months ago
I Vote B https://cloud.google.com/build/docs/configuring-builds/pass-data-between-steps#passing_data_using_workspaces
upvoted 1 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 ...