PROFESSIONAL-CLOUD-DEVELOPER · Question #343
You have developed a Python application that you want to containerize and deploy to Cloud Run. You have developed a Cloud Build pipeline with the following steps: After triggering the pipeline, you no
The correct answer is B. The Docker container image has not been pushed to Artifact Registry. Add a step to the pipeline. The pipeline steps in the image show that the Docker image is built, but there is no step to push the built image to Artifact Registry. Cloud Run requires the container image to be in a registry (such as Artifact Registry or Container Registry) before it can be deployed. Adding a
Question
You have developed a Python application that you want to containerize and deploy to Cloud Run. You have developed a Cloud Build pipeline with the following steps:
After triggering the pipeline, you notice in the Cloud Build logs that the final step of the pipeline fails and the container is unable to be deployed to Cloud Run. What is the cause of this issue, and how should you resolve it?
Exhibit
Options
- AThe final step uses a Cloud Run instance name that does not match the container name. Update
- BThe Docker container image has not been pushed to Artifact Registry. Add a step to the pipeline
- CCloud Run does not allow unauthenticated invocations. Remove the --allow-unauthenticated
- DUnit tests in the pipeline are failing. Update the application code so that all unit tests pass, and
How the community answered
(26 responses)- A8% (2)
- B85% (22)
- C4% (1)
- D4% (1)
Explanation
The pipeline steps in the image show that the Docker image is built, but there is no step to push the built image to Artifact Registry. Cloud Run requires the container image to be in a registry (such as Artifact Registry or Container Registry) before it can be deployed. Adding a step to push the container image to Artifact Registry after it is built will make the image available for deployment, allowing the final step to deploy the application to Cloud Run successfully.
Topics
Community Discussion
No community discussion yet for this question.
