# Professional-Cloud-Developer — Question 426

**Type:** multiple_choice
**Topics:** topic_1

## Question

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?

## Correct Answer

_See scenario._

## Explanation

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.

**Reference:** examtopics_top_comment

---
Source: https://hiexam.net/q/google/Professional-Cloud-Developer/426  
Practice (tracked): https://hiexam.net/study/Professional-Cloud-Developer/practice