-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
29 lines (25 loc) · 1002 Bytes
/
cloudbuild.yaml
File metadata and controls
29 lines (25 loc) · 1002 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
steps:
# Step 1: Build Docker image
- name: "gcr.io/cloud-builders/docker"
args: ["build", "-t", "asia-southeast2-docker.pkg.dev/$PROJECT_ID/apimodel/translate-api:$SHORT_SHA", "."]
# Step 2: Push Docker image to Artifact Registry
- name: "gcr.io/cloud-builders/docker"
args: ["push", "asia-southeast2-docker.pkg.dev/$PROJECT_ID/apimodel/translate-api:$SHORT_SHA"]
# Step 3: Deploy image to Cloud Run
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
entrypoint: "gcloud"
args:
- "run"
- "deploy"
- "translate-api"
- "--image"
- "asia-southeast2-docker.pkg.dev/$PROJECT_ID/apimodel/translate-api:$SHORT_SHA"
- "--platform"
- "managed"
- "--region"
- "asia-southeast2"
- "--allow-unauthenticated"
- "--service-account=$SERVICE_ACCOUNT_EMAIL"
images:
- "asia-southeast2-docker.pkg.dev/$PROJECT_ID/apimodel/translate-api:$SHORT_SHA"
logsBucket: "gs://tabi-translate/log_cloudbuild_tabiapp_api_translate"