
Answer-first summary for fast verification
Answer: Include a cloud build configuration file upon code push to the branch. Establish a trigger in Cloud Build for the 'Push to a branch' event.
The correct approach is to add a cloud build configuration file and create a trigger in Cloud Build for the 'Push to a branch' event. This setup automatically initiates a build when code is pushed to the branch in the cloud source repository, aligning with the requirement for minimal management overhead. Other options either involve incorrect trigger locations (Cloud Source Repository instead of Cloud Build), unnecessary complexity (cloud functions), or irrelevant events ('Pull request' when the focus is on branch pushes). Reference: Creating a build trigger in Cloud Build documentation.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Imagine you're designing an automated CI pipeline to build and push images to Container Registry. Currently, developers manually issue build commands after pushing code to the test branch in the source repository. What steps would you take to automate the build process for the test branch with minimal management overhead?
A
Implement a cloud function triggered upon code commit to the cloud source repository.
B
Include a cloud build configuration file upon code push to the branch. Establish a trigger in Cloud Build for the 'Push to a branch' event.
C
Include a cloud build configuration file upon code push to the branch. Establish a trigger in Cloud Source Repository for the 'Push to a branch' event.
D
Include a cloud build configuration file upon code push to the branch. Establish a trigger in Cloud Build for the 'Pull request' event.
No comments yet.