Cloud Deploy pushes a release to the Dev GKE cluster. You want automatic promotion to the Test cluster when the Dev deploy succeeds. Following Google best practices, how should you configure this?
Choose an answer
Tap an option to check your answer.
Correct answer: 1. Create a Cloud Function that calls the Google Cloud Deploy API to promote the application to the Test cluster. 2. Configure this function to be triggered by SUCCEEDED Pub/Sub messages from the clouddeploy-operations topic..
Why this is the answer
The correct approach uses a Cloud Function triggered by Cloud Deploy's Pub/Sub notifications. Cloud Deploy publishes messages to the clouddeploy-operations topic when operations like a deployment succeed. A Cloud Function can subscribe to this topic and, upon receiving a SUCCEEDED message for the Dev environment, call the Google Cloud Deploy API to promote the release to the Test cluster. This aligns with best practices for automated promotion in Cloud Deploy. Option 1 is incorrect because Cloud Build is not the primary mechanism for Cloud Deploy promotions; Cloud Deploy's API is designed for this. Option 2 is incorrect because cloud-builds topic relates to Cloud Build events, not Cloud Deploy operation successes. Option 4 is incorrect as it misuses Cloud Build for promotion logic that Cloud Deploy's API handles directly and incorrectly targets the cloud-builds topic.
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