exam questions

Exam Professional Cloud DevOps Engineer All Questions

View all questions & answers for the Professional Cloud DevOps Engineer exam

Exam Professional Cloud DevOps Engineer topic 1 question 108 discussion

Actual exam question from Google's Professional Cloud DevOps Engineer
Question #: 108
Topic #: 1
[All Professional Cloud DevOps Engineer Questions]

You are creating a CI/CD pipeline in Cloud Build to build an application container image. The application code is stored in GitHub. Your company requires that production image builds are only run against the main branch and that the change control team approves all pushes to the main branch. You want the image build to be as automated as possible. What should you do? (Choose two.)

  • A. Create a trigger on the Cloud Build job. Set the repository event setting to ‘Pull request’.
  • B. Add the OWNERS file to the Included files filter on the trigger.
  • C. Create a trigger on the Cloud Build job. Set the repository event setting to ‘Push to a branch’
  • D. Configure a branch protection rule for the main branch on the repository.
  • E. Enable the Approval option on the trigger.
Show Suggested Answer Hide Answer
Suggested Answer: CD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ManishKS
Highly Voted 1 year, 1 month ago
CD is the correct answer ,This will ensure that the image build is only triggered when a push is made to the main branch, and that the push is approved by the change control team. Explanation: Option C: Setting the repository event setting to ‘Push to a branch’ will trigger the Cloud Build job whenever a push is made to any branch in the repository. This is necessary because you want the image build to be triggered when a push is made to the main branch. Option D: Configuring a branch protection rule for the main branch on the repository will require that all pushes to the main branch be approved by the change control team. This is necessary to ensure that only approved changes are made to the main branch, which will then trigger the image build.
upvoted 7 times
Jason_Cloud_at
1 year ago
in the question it says "Automated" doesn't option E works as well ?
upvoted 2 times
...
...
edd004
Most Recent 10 months, 3 weeks ago
Selected Answer: CD
C) Triggers Only when pushing or merging into a branch in our case would be main branch D) Configuring branch protection, gives you the control over the branch and who can push to it, so any changes would need to be done over a pull request, and will need to be approved before merging.
upvoted 4 times
...
xhilmi
11 months ago
Selected Answer: CD
To ensure that production image builds are run only against the main branch and require approval from the change control team, the recommended actions are to configure a trigger on the Cloud Build job with the repository event setting set to 'Push to a branch' (Option C) and to configure a branch protection rule for the main branch on the repository (Option D). Configuring the trigger for 'Push to a branch' ensures that Cloud Build is triggered specifically when changes are pushed to the main branch. Additionally, setting up a branch protection rule for the main branch adds an extra layer of control by enforcing policies such as requiring code reviews and approval from designated individuals or teams before changes are merged into the main branch. Together, these measures automate the image build process while adhering to the specified requirements and maintaining a robust change control workflow.
upvoted 3 times
...
lelele2023
1 year ago
Selected Answer: CD
A push event to branches(including main) can then trigger an automated image build. Enabling branch protection will enforce a pull request, and it then involve ppl to review.
upvoted 2 times
...
Jason_Cloud_at
1 year ago
C is definetly the anaswer, I have slight confusion on D and E , Most probably will go with E since the questions says automated.
upvoted 1 times
...
nhiguchi
1 year ago
Selected Answer: CD
Answer should be CD.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago