Google Cloud Professional Cloud Developer — Question 73
Your company stores their source code in a Cloud Source Repositories repository. Your company wants to build and test their code on each source code commit to the repository and requires a solution that is managed and has minimal operations overhead.
Which method should they use?
Answer options
- A. Use Cloud Build with a trigger configured for each source code commit.
- B. Use Jenkins deployed via the Google Cloud Platform Marketplace, configured to watch for source code commits.
- C. Use a Compute Engine virtual machine instance with an open source continuous integration tool, configured to watch for source code commits.
- D. Use a source code commit trigger to push a message to a Cloud Pub/Sub topic that triggers an App Engine service to build the source code.
Correct answer: A
Explanation
The correct answer is A because Cloud Build is a fully managed service that automatically handles builds and tests with minimal operational overhead. The other options involve either self-managed tools like Jenkins (B and C) which require more maintenance, or a more complex setup with Cloud Pub/Sub and App Engine (D) that is unnecessary for straightforward builds.