Google Professional Machine Learning Engineer Question 166
Single answerGoogle Cloud PlatformYou are building a machine learning pipeline on Google Cloud. Your team uses GitHub as the code repository and Cloud Build for CI/CD. You need to ensure that any updates to your machine learning model's code automatically trigger a build and deployment process in your Google Cloud environment. What is the best way to achieve this integration?
- A
Set up a webhook in GitHub to trigger Cloud Build on code changes.
- B
Create a manual process for developers to trigger Cloud Build after every code update.
- C
Use Cloud Source Repositories to mirror the GitHub repository and configure Cloud Build triggers.
- D
Manually upload the updated code to Cloud Storage and configure Cloud Build to trigger a pipeline.
Show answer and explanation
Correct answer: A
Explanation
The best way to integrate GitHub with Cloud Build is by setting up a webhook in GitHub. This allows changes in the GitHub repository to automatically trigger builds and deployments in Google Cloud, ensuring continuous integration and delivery without manual intervention. Other options either introduce unnecessary complexity or are not scalable solutions.
- A. Correct.
Correct: Setting up a webhook in GitHub allows automatic triggering of Cloud Build whenever there are changes in the repository, ensuring a seamless CI/CD pipeline.
- B. Incorrect.
Incorrect: A manual process would introduce delays and human error into the pipeline, defeating the purpose of automation.
- C. Incorrect.
Incorrect: While Cloud Source Repositories can be used to mirror GitHub repositories, this adds unnecessary complexity. Direct integration via a webhook is a simpler and more efficient solution.
- D. Incorrect.
Incorrect: Manually uploading code to Cloud Storage is error-prone and not a scalable solution for CI/CD pipelines.