-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
32 lines (29 loc) · 1.08 KB
/
Copy pathcloudbuild.yaml
File metadata and controls
32 lines (29 loc) · 1.08 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
steps:
# 1. Build Docker image dari Dockerfile
- name: 'gcr.io/cloud-builders/docker'
args:
- 'build'
- '--build-arg'
- 'NEXT_PUBLIC_SUPABASE_URL=https://svowzhfomolsxhojlpsi.supabase.co'
- '--build-arg'
- 'NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InN2b3d6aGZvbW9sc3hob2pscHNpIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzkwNjk0MzYsImV4cCI6MjA5NDY0NTQzNn0.IjluiaRXA2OwY_trpZFppZ6PNEkRS_-us9JWIGVxZAs'
- '-t'
- 'gcr.io/$PROJECT_ID/web-app:$COMMIT_SHA'
- '.'
# 2. Push image container ke Container Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/web-app:$COMMIT_SHA']
# 3. Deploy langsung image tersebut ke Cloud Run Jakarta
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args:
- 'run'
- 'deploy'
- 'developmentweb-service'
- '--image'
- 'gcr.io/$PROJECT_ID/web-app:$COMMIT_SHA'
- '--region'
- 'asia-southeast2'
- '--allow-unauthenticated'
options:
logging: 'CLOUD_LOGGING_ONLY'