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 100 discussion

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

Your development team is using Cloud Build to promote a Node.js application built on App Engine from your staging environment to production. The application relies on several directories of photos stored in a Cloud Storage bucket named webphotos-staging in the staging environment. After the promotion, these photos must be available in a Cloud Storage bucket named webphotos-prod in the production environment. You want to automate the process where possible. What should you do?

  • A. Manually copy the photos to webphotos-prod.
  • B. Add a startup script in the application's app.yami file to move the photos from webphotos-staging to webphotos-prod.
  • C. Add a build step in the cloudbuild.yaml file before the promotion step with the arguments:
  • D. Add a build step in the cloudbuild.yaml file before the promotion step with the arguments:
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
omermahgoub
11 months, 2 weeks ago
C.Add a build step in the cloudbuild.yaml file before the promotion step with the arguments: -name: gcr.io/cloud-builders/gsutil args: ['cp','-r','gs://webphotos-staging','gs://webphotos-prod'] waitFor: ['-'] You should add a build step in the cloudbuild.yaml file before the promotion step with the arguments shown above. This build step will use the gsutil tool to copy the photos from the webphotos-staging bucket to the webphotos-prod bucket. The -r flag tells gsutil to copy all files in the bucket recursively, and the waitFor parameter tells Cloud Build to wait for this step to complete before continuing with the promotion step.
upvoted 4 times
...
zellck
12 months ago
Selected Answer: C
C is the answer.
upvoted 1 times
...
tomato123
1 year, 4 months ago
Selected Answer: C
C is correct
upvoted 2 times
...
nehaxlpb
1 year, 5 months ago
Selected Answer: C
https://cloud.google.com/storage/docs/gsutil/commands/cp
upvoted 1 times
...
Blueocean
1 year, 11 months ago
Agree with Option C
upvoted 3 times
...
ParagSanyashiv
1 year, 11 months ago
Agree with C
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 ...