Google Professional Cloud DevOps Engineer exam dumps

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

Select 2Google Cloud Platform

Your team is implementing a continuous integration (CI) pipeline using Cloud Build for a multi-service application hosted in Google Cloud. The application consists of a backend API and a frontend web application that are stored in separate Git repositories. Each service has its own Dockerfile for containerization. The team wants to ensure that changes to either repository trigger a build for the relevant service and deploy the updated container to a Google Kubernetes Engine (GKE) cluster. How should you configure the Cloud Build setup to achieve this?

  1. A

    Create separate Cloud Build triggers for each Git repository, configured to trigger on changes to their respective branches.

  2. B

    Use a single Cloud Build trigger that monitors both Git repositories and runs a shared build configuration file for both services.

  3. C

    Define separate cloudbuild.yaml files in each repository to handle the build and deployment process for their respective services.

  4. D

    Configure Cloud Build to use Pub/Sub to listen to repository changes and dynamically determine which service to build.

  5. E

    Use Google Cloud Deploy instead of Cloud Build to manage the continuous integration process for both services.

Show answer and explanation

Correct answers: A, C

Explanation

To implement a CI pipeline for a multi-service application using Cloud Build, it is best practice to create independent build triggers for each service’s repository. Each repository should also maintain its own cloudbuild.yaml file to define service-specific build and deployment steps. This approach ensures that changes to one service do not unnecessarily trigger builds for the other, making the pipeline efficient and maintainable.

  • A. Correct.

    Correct: Creating separate Cloud Build triggers for each repository ensures that changes in each service’s codebase independently trigger builds for only the relevant service.

  • B. Incorrect.

    Incorrect: Using a single Cloud Build trigger for both repositories is not recommended because it cannot easily differentiate which service needs to be built and deployed when a change occurs.

  • C. Correct.

    Correct: Defining separate cloudbuild.yaml files in each repository allows for service-specific build and deployment steps, making the pipeline modular and maintainable.

  • D. Incorrect.

    Incorrect: While Pub/Sub can be used to trigger builds in some scenarios, it is unnecessary and overly complex for this use case, as Cloud Build triggers natively support Git repository changes.

  • E. Incorrect.

    Incorrect: Google Cloud Deploy is a separate tool designed primarily for continuous delivery (CD), not continuous integration (CI). Cloud Build is the appropriate choice for CI in this scenario.

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