nerdexam
GoogleGoogle

PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #189

PROFESSIONAL-CLOUD-DEVOPS-ENGINEER Question #189: Real Exam Question with Answer & Explanation

The correct answer is D: Change the build script to:. Cloud Build supports parallel step execution using the waitFor field. To run foo and bar in parallel and then block baz until both complete, each step needs a unique id, and baz should have waitFor: ['foo', 'bar']. Without waitFor, steps run sequentially by default. Option D corr

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

Question

You are configuring a CI pipeline in Cloud Build When you test the pipeline, the following cloudbuild.yaml definition results in 5 minutes each on the foo step and bar step. The foo step and bar step are independent of each other. The baz step needs both the foo and bar steps to be completed before starting. You want to use parallelism to reduce build times What should you do?

Options

  • AModify the build script to add:
  • BModify the build script to add:
  • CChange the build script to:
  • DChange the build script to:

Explanation

Cloud Build supports parallel step execution using the waitFor field. To run foo and bar in parallel and then block baz until both complete, each step needs a unique id, and baz should have waitFor: ['foo', 'bar']. Without waitFor, steps run sequentially by default. Option D correctly restructures the cloudbuild.yaml to assign IDs to foo and bar, lets them run concurrently (by using waitFor: ['-'] or no waitFor on each), and configures baz to wait for both. This reduces total build time from ~15 minutes (sequential) to ~10 minutes (foo and bar in parallel, then baz).

Topics

#Cloud Build#CI/CD#Parallel Builds#Build Optimization

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVOPS-ENGINEER PracticeBrowse All PROFESSIONAL-CLOUD-DEVOPS-ENGINEER Questions