
Answer-first summary for fast verification
Answer: Connect to an external repository in Cloud Source Repository. Authorize Google Cloud Platform to connect to the GitHub repository. Create a trigger in Cloud Build to automate the image creation, Commit code to the repository in GitHub
Connecting to an external repository such as GitHub in Cloud Source Repository (CSR) and authorizing Google Cloud Platform to access the GitHub repository minimizes overhead. Code commits remain in GitHub, mirrored to CSR, and triggers Cloud Build for image creation. Options D and E are incorrect as they involve unnecessary steps like creating a new repository in CSR and cloning the GitHub repository, which adds overhead. Option C is incorrect because Cloud Build does not require additional permissions to build images. References: [Mirroring a GitHub repository](https://cloud.google.com/source-repositories/docs/mirroring-a-github-repository), [Integrating with Cloud Build](https://cloud.google.com/source-repositories/docs/integrating-with-cloud-build).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Your organization is transitioning its applications to the Cloud and currently uses GitHub repositories for source code version control. You are tasked with setting up a proof-of-concept deployment that links GitHub to Cloud Build for image creation and deployment. Which TWO steps would you take to achieve this with minimal overhead?
A
Commit code to the repository in GitHub
B
Connect to an external repository in Cloud Source Repository. Authorize Google Cloud Platform to connect to the GitHub repository. Create a trigger in Cloud Build to automate the image creation
C
Grant the Cloud Build service account the permissions to build the image
D
Create a new repository in Cloud Source Repository. Create a trigger in Cloud Build to automate the image creation. Clone the GitHub repository
E
Commit code to the new repository in Cloud Source Repository