cloudbuild.yaml

Example cloudbuild.yaml for the keduAPI project to deploy google cloud

steps:

# Build the container image

- name: 'gcr.io/cloud-builders/docker'

args: ['build', '-t', 'gcr.io/$PROJECT_ID/keduapi', '.']

  

# Push the container image to Container Registry

- name: 'gcr.io/cloud-builders/docker'

args: ['push', 'gcr.io/$PROJECT_ID/keduapi']

  

# Deploy container to Cloud Run

- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'

entrypoint: gcloud

args:

- 'run'

- 'deploy'

- 'keduapi'

- '--image'

- 'gcr.io/$PROJECT_ID/keduapi'

- '--platform'

- 'managed'

- '--region'

- 'europe-west1'

- '--allow-unauthenticated'

  

images:

- 'gcr.io/$PROJECT_ID/keduapi'