Google Professional Cloud DevOps Engineer exam dumps

Google Professional Cloud DevOps Engineer practice question 60 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 60

Single answerGoogle Cloud Platform

You are responsible for setting up a CI/CD pipeline for a team developing a microservices application on Google Cloud Platform. The team wants the pipeline to automatically trigger deployments to the staging environment only when new code is pushed to the 'release' branch in the repository. How can you configure the pipeline to meet this requirement?

  1. A

    Use Cloud Build with a trigger configured to run when changes are pushed to the 'release' branch.

  2. B

    Configure a Cloud Scheduler job to periodically check for changes in the 'release' branch and trigger the pipeline.

  3. C

    Set up a Pub/Sub topic that listens for repository events and triggers the pipeline when changes are pushed to any branch.

  4. D

    Use Cloud Build with a trigger that listens for a specific tag pattern instead of branch changes.

Show answer and explanation

Correct answer: A

Explanation

Cloud Build allows you to define branch-specific triggers, which is ideal for this scenario where the pipeline must automatically deploy to staging when changes are pushed to the 'release' branch. This ensures an event-driven, efficient, and accurate CI/CD pipeline configuration.

  • A. Correct.

    This is correct. Cloud Build supports branch-specific triggers, allowing you to configure the pipeline to trigger only when changes are pushed to the 'release' branch.

  • B. Incorrect.

    This is incorrect. While Cloud Scheduler can be used for periodic tasks, it is inefficient and not event-driven, which does not align with the requirement for automatic branch-specific triggers.

  • C. Incorrect.

    This is incorrect. A Pub/Sub topic listening for events from any branch does not provide the necessary granularity to trigger deployments exclusively for the 'release' branch.

  • D. Incorrect.

    This is incorrect. A trigger based on tag patterns is not suitable for this scenario, as the requirement is to trigger on branch-specific changes, not tags.

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