
Answer-first summary for fast verification
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.
To automatically promote the application to the Test cluster after a successful deployment to Dev using Google-recommended practices, the correct approach involves leveraging Cloud Deploy's native Pub/Sub notifications. Cloud Deploy publishes deployment operation events (e.g., SUCCEEDED) to the `clouddeploy-operations` Pub/Sub topic. A Cloud Function can be configured to trigger on these events and call the Cloud Deploy API to promote the release to the next environment (Test). This ensures seamless integration with Cloud Deploy's workflow without unnecessary reliance on Cloud Build for promotion steps. Option C correctly uses the `clouddeploy-operations` topic and the Cloud Deploy API, aligning with best practices for event-driven automation in the CI/CD pipeline.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
As a developer deploying a web application to Google Kubernetes Engine (GKE) using Cloud Deploy in a CI/CD pipeline, how should you configure automatic promotion from the Dev cluster to the Test cluster after successful deployment, adhering to Google's recommended best practices?
(Include any relevant corrected code blocks or configuration examples if applicable.)
A
B
C
D