PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #189
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…
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…
Question
Options
- AModify the build script to add:
- BModify the build script to add:
- CChange the build script to:
- DChange the build script to:
How the community answered
(41 responses)- A10% (4)
- B2% (1)
- C7% (3)
- D80% (33)
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
Community Discussion
No community discussion yet for this question.