forked from NdoleStudio/httpsms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
28 lines (26 loc) · 822 Bytes
/
cloudbuild.yaml
File metadata and controls
28 lines (26 loc) · 822 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
steps:
- name: "gcr.io/kaniko-project/executor:v1.23.2"
id: "Build image and push"
dir: "api"
args:
- "--destination=us.gcr.io/$PROJECT_ID/$_SERVICE_NAME:$SHORT_SHA"
- "--destination=us.gcr.io/$PROJECT_ID/$_SERVICE_NAME:latest"
- "--dockerfile=Dockerfile"
- "--context=."
- "--build-arg=GIT_COMMIT=$SHORT_SHA"
- "--snapshot-mode=time"
- 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/$_SERVICE_NAME:$SHORT_SHA \
--region=$_REGION --platform managed --allow-unauthenticated \
--port=8000
options:
substitutionOption: ALLOW_LOOSE
substitutions:
_SERVICE_NAME: http-sms-api
_REGION: us-east1