-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
66 lines (58 loc) · 1.8 KB
/
Copy pathcloudbuild.yaml
File metadata and controls
66 lines (58 loc) · 1.8 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# ============================================================
# EVA-Mind - Cloud Build for Google Cloud Run
# ============================================================
# Trigger: git push to main branch
# Deploy: Cloud Run service "eva-mind"
# Region: southamerica-east1 (Sao Paulo)
# ============================================================
steps:
# Step 1: Build Docker image
- name: 'gcr.io/cloud-builders/docker'
args:
- 'build'
- '--build-arg=VERSION=${TAG_NAME:-latest}'
- '--build-arg=GIT_COMMIT=${SHORT_SHA}'
- '--build-arg=BUILD_TIME=${_BUILD_TIME}'
- '-t'
- 'gcr.io/${PROJECT_ID}/eva-mind:${SHORT_SHA}'
- '-t'
- 'gcr.io/${PROJECT_ID}/eva-mind:latest'
- '.'
# Step 2: Push image to Container Registry
- name: 'gcr.io/cloud-builders/docker'
args:
- 'push'
- 'gcr.io/${PROJECT_ID}/eva-mind:${SHORT_SHA}'
- name: 'gcr.io/cloud-builders/docker'
args:
- 'push'
- 'gcr.io/${PROJECT_ID}/eva-mind:latest'
# Step 3: Deploy to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: 'gcloud'
args:
- 'run'
- 'deploy'
- 'eva-mind'
- '--image=gcr.io/${PROJECT_ID}/eva-mind:${SHORT_SHA}'
- '--region=southamerica-east1'
- '--platform=managed'
- '--port=8091'
- '--memory=1Gi'
- '--cpu=2'
- '--min-instances=1'
- '--max-instances=10'
- '--timeout=3600'
- '--concurrency=80'
- '--allow-unauthenticated'
- '--set-env-vars=ENVIRONMENT=production'
- '--session-affinity'
substitutions:
_BUILD_TIME: '2026-02-10T00:00:00Z'
images:
- 'gcr.io/${PROJECT_ID}/eva-mind:${SHORT_SHA}'
- 'gcr.io/${PROJECT_ID}/eva-mind:latest'
options:
logging: CLOUD_LOGGING_ONLY
machineType: 'E2_HIGHCPU_8'
timeout: '1200s'