BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Professional Cloud Developer Exam - Topic 13 Question 72 Discussion

Posted by Xuan on Nov 26, 2023 at 08:06 AM

You are developing a new web application using Cloud Run and committing code to Cloud Source Repositories. You want to deploy new code in the most efficient way possible. You have already created a Cloud Build YAML file that builds a container and runs the following command: gcloud run deploy. What should you do next?

Suggested Answer: B

https://cloud.google.com/build/docs/triggers

Cloud Build uses build triggers to enable CI/CD automation. You can configure triggers to listen for incoming events, such as when a new commit is pushed to a repository or when a pull request is initiated, and then automatically execute a build when new events come in. You can also configure triggers to build code on any changes to your source repository or only on changes that match certain criteria.


Get Premium Professional Cloud Developer Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
25 comments · newest first
DO
Domitila 1 year ago
A Pub/Sub topic? I didn’t expect that option!
HA
Hannah 1 year ago
Definitely B! It triggers on push, which is what we need.
SA
Salome 1 year ago
Wait, a Cron job? D seems unnecessary for this.
KA
Karina 1 year ago
I think A is better for notifications, but B seems solid too.
LE
Leslie 1 year ago
B is the way to go! Super efficient.
SA
Santos 1 year ago
I definitely recall that using a Cron job for deployments isn't the best practice. It feels like option D is a bit outdated.
TH
Theron 1 year ago
I feel like option C might be useful for specific scenarios, but it seems more complex than what we need for this deployment.
CO
Colene 1 year ago
I'm not entirely sure, but I remember something about Pub/Sub topics in a different context. Is that really necessary here?
DO
Domingo 1 year ago
I think option B sounds familiar because we practiced setting up build triggers for automatic deployments when code is pushed.
AL
Alfreda 1 year ago
Creating a webhook build trigger could work, but I'm not sure if that's the most reliable approach. What if we forget to send the HTTP POST call? The build trigger seems like a safer bet.
DE
Desmond 1 year ago
Hmm, I'm a bit confused. Should we use Pub/Sub to get notified when code is pushed and then run the build file? Or is there a more direct way to trigger the build?
NA
Na 1 year ago
This seems pretty straightforward. I think the best approach would be to create a build trigger that runs the build file when code is pushed to the development branch.
LE
Leonida 1 year ago
I'm leaning towards the build trigger option. That way, the build will run automatically whenever new code is committed, which seems like the most efficient way to deploy updates.
TE
Tequila 1 year ago
I'm a bit confused on the difference between a public endpoint and a service endpoint. I'll have to review that.
RO
Rory 1 year ago
I'm leaning towards B - the breadth of the product mix. The more options customers have, the more flexibility they might have in their expectations and acceptable service levels. But I could see an argument for C as well. Tough call!
DO
Dominga 3 years ago
Haha, can you imagine setting up a cron job to deploy every 24 hours? Talk about inefficient! That's like the tortoise of deployment strategies.
JO
Joana 3 years ago
I agree, the build trigger is probably the best choice here. Plus, it's more secure than using a public webhook, right? I don't want to risk any unauthorized access to our code.
JE
Jestine 3 years ago
↳ replying to Joana
B: I agree, we definitely need to prioritize security when setting up our deployment process.
BR
Brett 3 years ago
↳ replying to Joana
A: That's right, unauthorized access to our code can lead to serious consequences.
RE
Renato 3 years ago
↳ replying to Joana
B: And it ensures that only authorized code changes trigger the deployment process.
DO
Dorian 3 years ago
↳ replying to Joana
A: Absolutely, security is crucial when deploying code. The build trigger provides a controlled way to automate our deployments.
DO
Donte 3 years ago
↳ replying to Joana
B: I think using a build trigger is a good idea. It's a more secure option and keeps our code safe.
HI
Hillary 3 years ago
↳ replying to Joana
A: Create a Pub/Sub topic to be notified when code is pushed to the repository. Create a Pub/Sub trigger that runs the build file when an event is published to the topic.
FE
Felix 3 years ago
Well, if we want the most efficient deployment, I'd say the build trigger is the way to go. That way, the build file runs automatically when the code is pushed, no need to wait for a cron job or anything.
BI
Billye 3 years ago
Ooh, this Cloud Run question looks tricky! I'm not sure if I should go with the Pub/Sub option or the build trigger. Decisions, decisions.
0/2000 characters

Save Cancel