-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
25 lines (21 loc) · 885 Bytes
/
cloudbuild.yaml
File metadata and controls
25 lines (21 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
steps:
# Copy model files from GCS
- name: 'gcr.io/cloud-builders/gsutil'
entrypoint: 'bash'
args:
- '-c'
- |
mkdir -p /workspace/files
gsutil -m cp -r gs://${_STORAGE}/* /workspace/files/
# Docker Build
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', '${_LOCATION}-docker.pkg.dev/${PROJECT_ID}/${_REPOSITORY}/${_IMAGE}', '.']
# Docker Push to Arifact Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', '${_LOCATION}-docker.pkg.dev/${PROJECT_ID}/${_REPOSITORY}/${_IMAGE}']
# Deploy container image to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args: ['run', 'deploy', '${_RUN_INSTANCE}', '--image', '${_LOCATION}-docker.pkg.dev/${PROJECT_ID}/${_REPOSITORY}/${_IMAGE}:latest', '--region', '${_LOCATION}']
images:
- '${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/${_IMAGE}:latest'