
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
The correct approach is to connect to an external repository like GitHub in Cloud Source Repository (CSR) and authorize Google Cloud Platform to access the GitHub repository. This method minimizes overhead by mirroring code from GitHub to CSR and triggering Cloud Build automatically. Other options either introduce unnecessary steps, such as creating a new repository and cloning the GitHub repository, or overlook the need to authorize Google Cloud Platform's access to GitHub. Reference: mirroring-a-github-repository, 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're tasked with setting up a proof-of-concept deployment that links GitHub to Cloud Build for image creation and deployment with minimal overhead. What steps should you take?
A
Commit code to the repository in GitHub
B
Grant the Cloud Build service account the permissions to build the image
C
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
D
Commit code to the new repository in Cloud Source Repository
E
Create a new repository in Cloud Source Repository. Create a trigger in Cloud Build to automate the image creation. Clone the GitHub repository.