Google Professional Cloud Developer

Google Professional Cloud Developer

Get started today

Ultimate access to all questions.


You are deploying a Python application to Cloud Run using Cloud Source Repositories and Cloud Build. The Cloud Build pipeline is shown below:

steps:
- name: python
  entrypoint: pip
  args: ["install", "-r", "requirements.txt", "--user"]
- name: 'gcr.io/cloud-builders/docker'
  args: ['build', '-t', 'us-central1-docker.pkg.dev/$(PROJECT_ID)/$(_REPO_NAME)/myimage:$(SHORT_SHA)', '.']
- name: 'gcr.io/cloud-builders/docker'
  args: ['push', 'us-central1-docker.pkg.dev/$(PROJECT_ID)/$(_REPO_NAME)/myimage:$(SHORT_SHA)']
- name: google/cloud-sdk
  args: ['cloud', 'run', 'deploy', 'helloworld-$(SHORT_SHA)',
    '--image=us-central1-docker.pkg.dev/$(PROJECT_ID)/$(_REPO_NAME)/myimage:$(SHORT_SHA)',
    '--region', 'us-central1', '--platform', 'managed',
    '--allow-unauthenticated']

You want to optimize deployment times and avoid unnecessary steps. What should you do?