QuestionQ98

VerifiedIntegrating applications with Google Cloud services

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

Explanation

Cloud Build orchestrates ordered build steps, including Cloud Storage operations. A gsutil copy step in cloudbuild.yaml before the App Engine promotion step recursively transfers photo directories from webphotos-staging to webphotos-prod, ensuring production content is populated before application promotion. Startup scripts are not suitable for pre-deployment data preparation, and manual copying removes automation.

Community Discussion

No comments yet. Be the first to start the discussion!