-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.dev.yaml
25 lines (25 loc) · 1.01 KB
/
cloudbuild.dev.yaml
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:
# Build the container image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/survey-app-backend:$COMMIT_SHA', '.']
# Push the container image to Container Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/survey-app-backend:$COMMIT_SHA']
# Deploy container image to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
# NOTE 地區選在台灣
args: ['run', 'deploy', 'survey-app-backend',
'--image', 'gcr.io/$PROJECT_ID/survey-app-backend:$COMMIT_SHA',
'--region', 'asia-east1',
'--platform', 'managed',
'--allow-unauthenticated',
'--update-env-vars', 'ENV=dev',
'--timeout=15m', '--memory=1Gi', '--concurrency=1', '--max-instances=10']
# secretEnv: ['CREDENTIALS']
images:
- 'gcr.io/$PROJECT_ID/survey-app-backend:$COMMIT_SHA'
#availableSecrets:
# secretManager:
# - versionName: projects/$PROJECT_ID/secrets/credential_for_backend/versions/1
# env: 'CREDENTIALS'