Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 241 of 481

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

Google Professional Cloud Developer Question 241

Select 2Google Cloud Platform

You are developing a cloud-native application and managing your source code using Cloud Source Repositories. Your team requires a workflow where changes are reviewed before merging into the main branch. Additionally, the team wants to enforce automated tests and linting before approving a merge. How can you achieve this using Google Cloud's capabilities?

  1. A

    Enable branch protection rules in Cloud Source Repositories and configure required reviews before merging.

  2. B

    Integrate Cloud Build with Cloud Source Repositories to run automated tests and linting during pull requests.

  3. C

    Use Artifact Registry to store and enforce dependencies for the application before merging changes.

  4. D

    Set up a pre-merge hook in Cloud Source Repositories to automatically approve changes without review.

  5. E

    Enable detailed commit logs in Cloud Source Repositories to track all changes before merging.

Show answer and explanation

Correct answers: A, B

Explanation

To meet the requirements, you need to enforce code reviews and automated testing/linting before merging changes. Enabling branch protection rules in Cloud Source Repositories ensures that code reviews are mandatory, and integrating Cloud Build allows for automated CI/CD workflows such as running tests and linting. These features together address the team's needs for a robust development workflow.

  • A. Correct.

    This is correct. Cloud Source Repositories supports branch protection rules, which allow you to enforce policies such as requiring code reviews before merging changes.

  • B. Correct.

    This is correct. Cloud Build can be integrated with Cloud Source Repositories to automatically run tests and linting as part of a CI/CD pipeline during pull requests.

  • C. Incorrect.

    This is incorrect. While Artifact Registry is useful for managing dependencies, it does not directly enforce review or testing workflows in source control management.

  • D. Incorrect.

    This is incorrect. Pre-merge hooks that automatically approve changes without review violate the requirement for changes to be reviewed before merging.

  • E. Incorrect.

    This is incorrect. While detailed commit logs are helpful for tracking changes, they do not enforce reviews or automated workflows like testing and linting.

Timed practice exam

Take a Google Professional Cloud Developer 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