During Cloud Build promotion from staging to production, photos in Cloud Storage bucket webphotos-staging must be available in webphotos-prod. You want to automate this. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Add a build step in the cloudbuild.yaml file before the promotion step that runs gsutil -m cp -r gs://webphotos-staging/** gs://webphotos-prod/..
Why this is the answer
The correct answer automates the photo transfer as part of the Cloud Build process. Adding a build step to the cloudbuild.yaml file that executes gsutil -m cp -r gs://webphotos-staging/ gs://webphotos-prod/ ensures that all photos from the staging bucket are copied to the production bucket before the application promotion. This integrates the data synchronization directly into the CI/CD pipeline. Manually copying is not automated and prone to errors. A startup script in app.yaml runs on application instance startup, not during the build and promotion process, and is not suitable for moving data between buckets as part of a deployment. The gcloud storage transfer service is designed for large-scale, scheduled, or one-time transfers between various storage locations, not typically for inline, small-scale transfers within a Cloud Build step for application promotion.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed