exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 165 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 165
Topic #: 1
[All Professional Cloud Developer Questions]

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?

  • A. Build a new Docker container that examines the files in /workspace and then checks and adds a copyright for each source file. Changed files are explicitly committed back to the source repository.
  • B. Build a new Docker container that examines the files in /workspace and then checks and adds a copyright for each source file. Changed files do not need to be committed back to the source repository.
  • C. Build a new Docker container that examines the files in a Cloud Storage bucket and then checks and adds a copyright for each source file. Changed files are written back to the Cloud Storage bucket.
  • D. Build a new Docker container that examines the files in a Cloud Storage bucket and then checks and adds a copyright for each source file. Changed files are explicitly committed back to the source repository.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
purushi
8 months, 4 weeks ago
Selected Answer: A
If a company policy states that every source code should have the copyright comment at the beginning of each file then for every build, we need to scan for each source code file and generate the copyright comments if not there, commit the updated files back to the repository. This is like a prebuild check.
upvoted 1 times
...
omermahgoub
1 year, 3 months ago
Selected Answer: A
A. Build a new Docker container that examines the files in /workspace and then checks and adds a copyright for each source file. Changed files are explicitly committed back to the source repository. This option would allow you to create a custom step in Cloud Build that is triggered by each source commit, which would examine the source files in the /workspace directory, check for the presence of a copyright comment, and add one if not present. By committing the changed files back to the source repository, you ensure that the updated files with the added copyright comment are properly tracked and stored in the source control system.
upvoted 2 times
...
telp
1 year, 3 months ago
Selected Answer: A
the code changes must be put back in the workplace folder or the sub other sub-step won't have the changes.
upvoted 1 times
...
TNT87
1 year, 4 months ago
https://cloud.google.com/build/docs/automating-builds/create-manage-triggers Answer A
upvoted 1 times
...
zellck
1 year, 4 months ago
Selected Answer: A
A is the answer. 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.
upvoted 3 times
...
zellck
1 year, 4 months ago
Selected Answer: B
B is the answer. 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.
upvoted 1 times
zellck
1 year, 4 months ago
Sorry answer should be A.
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago