PROFESSIONAL-CLOUD-DEVELOPER · Question #182
Your company's corporate policy states that there must be a copyright comment at the very beginning of all source files. You want to write a custom step in Cloud Build that is triggered by each source
The correct answer is A. Build a new Docker container that examines the files in /workspace and then checks and adds a. https://cloud.google.com/build/docs/configuring-builds/pass-data-between- steps#passing_data_using_workspaces To pass data between build steps, store the assets produced by the build step in /workspace and these assets will be available to any subsequent build steps.
Question
Your company's corporate policy states that there must be a copyright comment at the very beginning of all source files. You want to write a custom step in Cloud Build that is triggered by each source commit. You need the trigger to validate that the source contains a copyright and add one for subsequent steps if not there. What should you do?
Options
- ABuild a new Docker container that examines the files in /workspace and then checks and adds a
- BBuild a new Docker container that examines the files in /workspace and then checks and adds a
- CBuild a new Docker container that examines the files in a Cloud Storage bucket and then checks
- DBuild a new Docker container that examines the files in a Cloud Storage bucket and then checks
How the community answered
(44 responses)- A73% (32)
- B9% (4)
- C2% (1)
- D16% (7)
Explanation
https://cloud.google.com/build/docs/configuring-builds/pass-data-between- steps#passing_data_using_workspaces To pass data between build steps, store the assets produced by the build step in /workspace and these assets will be available to any subsequent build steps.
Topics
Community Discussion
No community discussion yet for this question.