-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
34 lines (31 loc) · 862 Bytes
/
cloudbuild.yaml
File metadata and controls
34 lines (31 loc) · 862 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
26
27
28
29
30
31
32
33
34
steps:
# 1. Build Docker Image
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'--no-cache',
'-t', 'gcr.io/$PROJECT_ID/spatial-engine',
'--build-arg', 'VITE_GEMINI_API_KEY=${_GEMINI_API_KEY}',
'.'
]
# 2. Push Image
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/spatial-engine']
# 3. Deploy to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args:
- 'run'
- 'deploy'
- 'spatial-engine'
- '--image'
- 'gcr.io/$PROJECT_ID/spatial-engine'
- '--region'
- 'us-central1'
- '--platform'
- 'managed'
- '--allow-unauthenticated'
- '--set-env-vars'
- 'GEMINI_API_KEY=${_GEMINI_API_KEY},GOOGLE_API_KEY=${_GEMINI_API_KEY}'
images:
- 'gcr.io/$PROJECT_ID/spatial-engine'