Google Professional Cloud DevOps Engineer exam dumps

Google Professional Cloud DevOps Engineer practice question 59 of 268

Professional Cloud DevOps Engineer. Associate level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud DevOps Engineer Question 59

Single answerGoogle Cloud Platform

Your organization is using Google Cloud Build for continuous integration and deployment. You have been tasked with setting up a CI/CD pipeline that automatically starts a build whenever there is a new commit to the main branch of your repository in Cloud Source Repositories. Which trigger configuration should you use?

  1. A

    Create a Cloud Build trigger with an event type set to 'Push to a branch' and specify the branch as 'main'.

  2. B

    Create a Cloud Build trigger with an event type set to 'Pull request' and specify the branch as 'main'.

  3. C

    Manually start a Cloud Build job whenever there is a new commit to the repository.

  4. D

    Create a Cloud Build trigger with an event type set to 'Tag' and specify a tag pattern matching 'v*'.

Show answer and explanation

Correct answer: A

Explanation

To set up an automated CI/CD pipeline in Google Cloud Build that triggers on new commits to the 'main' branch, you need to configure a trigger with the event type 'Push to a branch' and specify the branch as 'main'. This ensures that every time a commit is pushed to the 'main' branch, a new build is automatically initiated. Other event types, such as 'Pull request' or 'Tag', are for different use cases and would not meet the requirements specified in the scenario.

  • A. Correct.

    This is the correct option. A Cloud Build trigger with an event type set to 'Push to a branch' and specifying the branch as 'main' ensures that the pipeline is triggered whenever new commits are pushed to the 'main' branch.

  • B. Incorrect.

    This is incorrect. A 'Pull request' event type is used to trigger builds when a pull request is created or updated, not for direct commits to a branch.

  • C. Incorrect.

    This is incorrect. Manually starting a Cloud Build job is not automated and does not align with the principles of a CI/CD pipeline.

  • D. Incorrect.

    This is incorrect. A 'Tag' event type triggers builds based on specific tags, not commits to a branch.

Timed practice exam

Take a Google Professional Cloud DevOps Engineer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam