
Answer-first summary for fast verification
Answer: Create a Cloud Pub/Sub push subscription to the Cloud Build cloud-builds PubSub topic to HTTP POST the build information to a webhook.
The goal is to minimize development effort while integrating with a third-party monitoring platform via HTTP POST. Option D is optimal because it leverages Cloud Build's native integration with Cloud Pub/Sub. Cloud Build automatically publishes build events to the `cloud-builds` Pub/Sub topic. By creating a push subscription to this topic, the build information can be forwarded to the webhook via HTTP POST with minimal setup—no changes to the Cloud Build pipeline are needed. This approach avoids modifying individual build steps (Option A) or adding new steps (Option B), which require pipeline changes and increase effort. Option C uses Stackdriver Logging and alerts, but it may not capture full build details efficiently and adds complexity with logs-based metrics and alert policies. Thus, Option D provides a decoupled, low-effort solution.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have a multi-step Cloud Build pipeline for building and deploying your application to Google Kubernetes Engine (GKE). You need to integrate with a third-party monitoring platform by sending build information via an HTTP POST to a webhook while minimizing development effort. What is the recommended approach?
A
Add logic to each Cloud Build step to HTTP POST the build information to a webhook.
B
Add a new step at the end of the pipeline in Cloud Build to HTTP POST the build information to a webhook.
C
Use Stackdriver Logging to create a logs-based metric from the Cloud Build logs. Create an Alert with a Webhook notification type.
D
Create a Cloud Pub/Sub push subscription to the Cloud Build cloud-builds PubSub topic to HTTP POST the build information to a webhook.
No comments yet.