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 52 discussion

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

You are using Cloud Build to create a new Docker image on each source code commit to a Cloud Source Repositories repository. Your application is built on every commit to the master branch. You want to release specific commits made to the master branch in an automated method.
What should you do?

  • A. Manually trigger the build for new releases.
  • B. Create a build trigger on a Git tag pattern. Use a Git tag convention for new releases.
  • C. Create a build trigger on a Git branch name pattern. Use a Git branch naming convention for new releases.
  • D. Commit your source code to a second Cloud Source Repositories repository with a second Cloud Build trigger. Use this repository for new releases only.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
saurabh1805
Highly Voted 3 years, 11 months ago
B is correct answer
upvoted 19 times
...
santoshchauhan
Most Recent 7 months, 3 weeks ago
Selected Answer: B
B. Create a build trigger on a Git tag pattern. Use a Git tag convention for new releases. This approach is effective for managing releases in an automated yet controlled manner. By creating a Cloud Build trigger that activates based on a specific Git tag pattern, you can automate the build and deployment process for new releases. Git tags are often used to mark release points in the repository, so this aligns well with common development practices. When a commit is tagged in the repository with a specific pattern (e.g., "v1.0", "release-*"), Cloud Build can automatically trigger a build and potentially a deployment process. This allows for a more deliberate release process compared to triggering on every commit to the master branch.
upvoted 1 times
...
__rajan__
1 year, 1 month ago
Selected Answer: B
B is correct.
upvoted 1 times
...
tomato123
2 years, 2 months ago
Selected Answer: B
B is correct
upvoted 3 times
...
nehaxlpb
2 years, 3 months ago
Selected Answer: B
I don't know why people are selecting C , the qus says commit to master . C literally does not make sense how commit to a feature branch can trigger a master build.
upvoted 4 times
...
nqthien041292
2 years, 6 months ago
Selected Answer: B
Vote B
upvoted 2 times
...
Khratata
3 years ago
I think C correct answer
upvoted 1 times
...
[Removed]
3 years, 3 months ago
C) is not correct because the question says the commits are made in master branch. B) is good answer. When you want a release create a tag release-* , in Cloud Build use this pattern for tag.
upvoted 4 times
...
syu31svc
3 years, 3 months ago
https://cloud.google.com/source-repositories/docs/integrating-with-cloud-build: "you can set a trigger to start a build on commits that are made to a particular branch, or on commits that contain a particular tag" I would take C since the qn states that the commit is made to a branch
upvoted 2 times
gcp0omkar
2 years, 12 months ago
specific commits made to the master branch --> Tag would work here, team can continue pushing further changes in master branch, tag will point to specific version, so I feel correct answer is B
upvoted 1 times
...
...
pythonrocks
3 years, 6 months ago
C. https://cloud.google.com/build/docs/automating-builds/create-manage-triggers has either branch pattern or tag pattern
upvoted 1 times
...
maxdanny
3 years, 8 months ago
Also B is correct, but in the questions is specificied "branch name" , not tag
upvoted 4 times
boof
3 years, 1 month ago
"Your application is built on every commit to the master branch. You want to release SPECIFIC commits made to the master branch in an automated method." https://cloud.google.com/source-repositories/docs/integrating-with-cloud-build#create_a_build_trigger Both branch name and tag are valid triggers, but the question suggests we want to target specific commits to our master branch, therefore B, using a tag, seems more legit in this case.
upvoted 10 times
...
lollo1234
3 years, 4 months ago
"You want to release specific commits made to the master branch in an automated method" Looks like they're committing to the master branch, hence a tag would make more sense than a branch name.
upvoted 4 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