nerdexam
Google

PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #90

You are developing reusable infrastructure as code modules. Each module contains integration tests that launch the module in a test project. You are using GitHub for source control. You need to contin

The correct answer is D. Use Cloud Build to run tests in a specific folder. Trigger Cloud Build for every GitHub pull request.. To continuously test IaC modules on feature branches before merge, use Cloud Build triggered by every GitHub pull request, running tests in specific module folders.

Submitted by rania.sa· Apr 18, 2026Building and implementing CI/CD pipelines for a service

Question

You are developing reusable infrastructure as code modules. Each module contains integration tests that launch the module in a test project. You are using GitHub for source control. You need to continuously test your feature branch and ensure that all code is tested before changes are accepted. You need to implement a solution to automate the integration tests. What should you do?

Options

  • AUse a Jenkins server for CI/CD pipelines. Periodically run all tests in the feature branch.
  • BAsk the pull request reviewers to run the integration tests before approving the code.
  • CUse Cloud Build to run the tests. Trigger all tests to run after a pull request is merged.
  • DUse Cloud Build to run tests in a specific folder. Trigger Cloud Build for every GitHub pull request.

How the community answered

(37 responses)
  • A
    3% (1)
  • B
    5% (2)
  • C
    11% (4)
  • D
    81% (30)

Why each option

To continuously test IaC modules on feature branches before merge, use Cloud Build triggered by every GitHub pull request, running tests in specific module folders.

AUse a Jenkins server for CI/CD pipelines. Periodically run all tests in the feature branch.

A Jenkins server could be used, but 'periodically run all tests' does not align with the requirement to 'continuously test your feature branch' and 'before changes are accepted' as effectively as a direct pull request trigger.

BAsk the pull request reviewers to run the integration tests before approving the code.

Asking pull request reviewers to run integration tests is a manual process and does not fulfill the requirement to 'automate the integration tests' or ensure consistent execution.

CUse Cloud Build to run the tests. Trigger all tests to run after a pull request is merged.

Triggering all tests to run *after* a pull request is merged means that potential issues would only be discovered after the code is already integrated into the main branch, violating the 'before changes are accepted' requirement.

DUse Cloud Build to run tests in a specific folder. Trigger Cloud Build for every GitHub pull request.Correct

Using Cloud Build to run tests triggered by every GitHub pull request ensures that continuous testing is performed automatically on feature branches before merging, which aligns with the requirement for all code to be tested before acceptance. Running tests in a specific folder allows for targeted testing of individual modules, optimizing CI pipeline efficiency.

Concept tested: Cloud Build CI with GitHub pull requests

Source: https://cloud.google.com/cloud-build/docs/automate-builds-with-triggers/configure-github-app-triggers

Topics

#CI/CD pipelines#Automated testing#Cloud Build#GitHub integration

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVOPS-ENGINEER Practice