-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
33 lines (30 loc) · 902 Bytes
/
cloudbuild.yaml
File metadata and controls
33 lines (30 loc) · 902 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
30
31
32
33
steps:
- name: "gcr.io/kaniko-project/executor:latest"
id: "Build & Push Image"
args:
- "--destination=us.gcr.io/$PROJECT_ID/$_IMAGE_NAME:$SHORT_SHA"
- "--destination=us.gcr.io/$PROJECT_ID/$_IMAGE_NAME:latest"
- "--dockerfile=Dockerfile"
- "--context=."
- "--target=production"
- "--cache=true"
- "--cache-ttl=120h"
- id: "Deploy to Cloud Run"
name: "gcr.io/cloud-builders/gcloud"
entrypoint: "bash"
args:
- "-c"
- |
gcloud run deploy $_SERVICE_NAME \
--image=us.gcr.io/$PROJECT_ID/$_IMAGE_NAME:$SHORT_SHA \
--region=$_REGION_NAME \
--platform managed \
--allow-unauthenticated \
--port=50051 \
substitutions:
# Google Cloud Build / Run variables:
_IMAGE_NAME: observerly-nova
_REGION_NAME: us-central1
_SERVICE_NAME: "store"
options:
logging: CLOUD_LOGGING_ONLY