Cloud Build pipeline needs a flat file produced in one build step to be accessible to later steps. Where should you store it so subsequent builders can read it?
Choose an answer
Tap an option to check your answer.
Correct answer: Output the file contents to a file in /workspace. Read from the same /workspace file in the subsequent build step..
Why this is the answer
In Cloud Build, the /workspace directory is a persistent volume mounted across all build steps within a single build. This means any files written to /workspace by an earlier step are directly accessible to subsequent steps. This is the most efficient and intended way to share artifacts between steps. Using Compute Engine instance metadata is incorrect because Cloud Build steps run in isolated container environments, not directly on a user-managed Compute Engine instance, and metadata is for instance configuration, not inter-step file sharing. Storing in Cloud Storage via gsutil is possible but adds unnecessary latency and cost for inter-step communication within the same build, as it involves external network calls. Using an external web server via curl is overly complex, introduces external dependencies, and is not a standard or secure practice for sharing internal build artifacts.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed