
Answer-first summary for fast verification
Answer: Utilize Cloud Build to automatically trigger and execute the unit tests upon each push to the development branch, leveraging its integration with Cloud Source Repositories for seamless operation., Combine Cloud Build for immediate test execution upon push and Cloud Functions for additional logging and monitoring capabilities, ensuring both speed and observability.
Cloud Build is the best option for automating unit tests upon each push to a development branch due to its direct integration with Cloud Source Repositories, ensuring immediate feedback. Option E is also correct as it combines the immediacy of Cloud Build with the additional observability provided by Cloud Functions, making it a comprehensive solution for teams requiring both speed and monitoring. This approach meets the criteria of being cost-effective, scalable, and providing immediate feedback.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are tasked with automating the execution of unit tests for a Kubeflow Pipeline that requires custom libraries, triggered by each new push to a development branch in Cloud Source Repositories. The solution must be cost-effective, scalable, and provide immediate feedback to developers. Which of the following approaches BEST meets these requirements? (Choose two options if option E is available)
A
Develop a custom script that triggers unit tests on Cloud Run immediately after a push to the development branch, ensuring tests are run in an isolated environment.
B
Utilize Cloud Build to automatically trigger and execute the unit tests upon each push to the development branch, leveraging its integration with Cloud Source Repositories for seamless operation.
C
Implement a Cloud Logging sink to capture repository interactions, route these logs to a Pub/Sub topic, and use a Cloud Function triggered by Pub/Sub messages to execute the unit tests, adding complexity for logging and monitoring.
D
Configure a Cloud Scheduler job that periodically checks the development branch for new pushes and executes the unit tests on Cloud Run, introducing delays in feedback.
E
Combine Cloud Build for immediate test execution upon push and Cloud Functions for additional logging and monitoring capabilities, ensuring both speed and observability.