-
Notifications
You must be signed in to change notification settings - Fork 1
/
cloudbuild.yaml
44 lines (43 loc) · 1.07 KB
/
cloudbuild.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
steps:
- name: gcr.io/cloud-builders/docker
args:
- build
- '-t'
- '$_IMAGE_NAME:$COMMIT_SHA'
- '-t'
- '$_IMAGE_NAME:$BRANCH_NAME'
- .
id: Build
timeout: 600s
- name: gcr.io/cloud-builders/docker
args:
- push
- '$_IMAGE_NAME:$COMMIT_SHA'
- name: gcr.io/cloud-builders/docker
args:
- push
- '$_IMAGE_NAME:$BRANCH_NAME'
id: Push
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:alpine'
args:
- run
- services
- update
- $_SERVICE_NAME
- '--platform=managed'
- '--image=$_IMAGE_NAME:$COMMIT_SHA'
- >-
--labels=managed-by=gcp-cloud-build-deploy-cloud-run,commit-sha=$COMMIT_SHA,gcb-build-id=$BUILD_ID,gcb-trigger-id=$_TRIGGER_ID,$_LABELS
- '--region=$_DEPLOY_REGION'
- '--quiet'
id: Deploy
entrypoint: gcloud
images:
- '$_IMAGE_NAME:$COMMIT_SHA'
- '$_IMAGE_NAME:$BRANCH_NAME'
options:
substitutionOption: ALLOW_LOOSE
tags:
- gcp-cloud-build-deploy-cloud-run
- gcp-cloud-build-deploy-cloud-run-managed
- bibleserver