-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathcloudbuild-staging.yaml
57 lines (57 loc) · 1.98 KB
/
cloudbuild-staging.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
steps:
- name: gcr.io/cloud-builders/docker
args:
- build
- '--no-cache'
- '-t'
- '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA'
- .
- '-f'
- Dockerfile
- '--build-arg=COMMIT_SHA'
- '--build-arg=BRANCH_NAME'
- '--build-arg=BUILD_ID'
- '--build-arg=STAGING_DOPPLER_TOKEN'
- '--build-arg=UNIT_DOPPLER_TOKEN'
id: Build
env:
- 'APP_ENV=testing'
- 'COMMIT_SHA=$COMMIT_SHA'
- 'BRANCH_NAME=$BRANCH_NAME'
- 'BUILD_ID=$BUILD_ID'
- 'STAGING_DOPPLER_TOKEN=$_STAGING_DOPPLER_TOKEN'
- 'UNIT_DOPPLER_TOKEN=$_UNIT_DOPPLER_TOKEN'
- name: gcr.io/cloud-builders/docker
args:
- push
- '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA'
id: Push
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:slim'
args:
- run
- services
- update
- $_SERVICE_NAME
- '--platform=managed'
- '--image=$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_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:
- '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA'
options:
substitutionOption: ALLOW_LOOSE
substitutions:
_LABELS: gcb-trigger-id=ede880a1-371a-4f00-8d5c-bc004830334e
_TRIGGER_ID: ede880a1-371a-4f00-8d5c-bc004830334e
_PLATFORM: managed
_SERVICE_NAME: staging-quantimo-do
_DEPLOY_REGION: us-central1
_GCR_HOSTNAME: us.gcr.io
tags:
- gcp-cloud-build-deploy-cloud-run
- gcp-cloud-build-deploy-cloud-run-managed
- staging-quantimo-do