Google Cloud Professional Cloud Developer — Question 104

You are using Cloud Build for your CI/CD pipeline to complete several tasks, including copying certain files to Compute Engine virtual machines. Your pipeline requires a flat file that is generated in one builder in the pipeline to be accessible by subsequent builders in the same pipeline. How should you store the file so that all the builders in the pipeline can access it?

Answer options

Correct answer: B

Explanation

The correct approach is to output the file contents to a file in /workspace, allowing subsequent build steps to directly read from the same file. Options A and C involve using external services or storage, which adds complexity and potential delays. Option D unnecessarily complicates the process by relying on HTTP requests to transfer data between builders.