-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
41 lines (38 loc) · 1.24 KB
/
Copy pathcloudbuild.yaml
File metadata and controls
41 lines (38 loc) · 1.24 KB
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
35
36
37
38
39
40
41
steps:
# Build multi-stage Docker image (Node frontend + Python backend)
- name: 'gcr.io/cloud-builders/docker'
args:
- build
- --platform=linux/amd64
- -t
- us-central1-docker.pkg.dev/$PROJECT_ID/taleweaver/backend:$COMMIT_SHA
- -t
- us-central1-docker.pkg.dev/$PROJECT_ID/taleweaver/backend:latest
- .
# Push all tags to Artifact Registry
- name: 'gcr.io/cloud-builders/docker'
args:
- push
- --all-tags
- us-central1-docker.pkg.dev/$PROJECT_ID/taleweaver/backend
# Deploy to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args:
- run
- deploy
- taleweaver
- --image=us-central1-docker.pkg.dev/$PROJECT_ID/taleweaver/backend:$COMMIT_SHA
- --region=us-central1
- --platform=managed
- --allow-unauthenticated
- --timeout=3600
- --memory=1Gi
- --cpu=2
- --concurrency=80
- --min-instances=1
- --set-env-vars=GOOGLE_CLOUD_PROJECT=$PROJECT_ID,GOOGLE_CLOUD_LOCATION=us-central1,IMAGE_MODEL=gemini-3.1-flash-image-preview,IMAGE_LOCATION=global
- --update-secrets=GEMINI_API_KEY=gemini-api-key:latest
- --project=$PROJECT_ID
options:
logging: CLOUD_LOGGING_ONLY