Google Cloud Professional Cloud Developer — Question 234
You plan to deploy a new Go application to Cloud Run. The source code is stored in Cloud Source Repositories. You need to configure a fully managed, automated, continuous deployment pipeline that runs when a source code commit is made. You want to use the simplest deployment solution. What should you do?
Answer options
- A. Configure a cron job on your workstations to periodically run gcloud run deploy --source in the working directory.
- B. Configure a Jenkins trigger to run the container build and deploy process for each source code commit to Cloud Source Repositories.
- C. Configure continuous deployment of new revisions from a source repository for Cloud Run using buildpacks.
- D. Use Cloud Build with a trigger configured to run the container build and deploy process for each source code commit to Cloud Source Repositories.
Correct answer: D
Explanation
The correct answer is D because using Cloud Build with a trigger allows for an automated process that directly responds to changes in the source code repository, ensuring continuous deployment. Option A is incorrect as it relies on manual scheduling, while option B introduces unnecessary complexity by using Jenkins. Option C, while valid, does not represent the simplest solution compared to the direct integration provided by Cloud Build.