-
Notifications
You must be signed in to change notification settings - Fork 3
/
cloudbuild.yaml
57 lines (57 loc) · 1.82 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
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'
- >-
$_AR_HOSTNAME/$PROJECT_ID/cloud-run-source-deploy/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA
- '--build-arg=AUTH_SECRET=$_AUTH_SECRET'
- '--build-arg=AUTH_GOOGLE_ID=$_AUTH_GOOGLE_ID'
- '--build-arg=AUTH_GOOGLE_SECRET=$_AUTH_GOOGLE_SECRET'
- '--build-arg=DATABASE_URL=$_DATABASE_URL'
- '--build-arg=RAZORPAY_KEY=$_RAZORPAY_KEY'
- '--build-arg=RAZORPAY_SECRET=$_RAZORPAY_SECRET'
- '--build-arg=AUTH_TRUST_HOST=$_AUTH_TRUST_HOST'
- '--build-arg=AUTH_URL=$_AUTH_URL'
- .
- '-f'
- Dockerfile
id: Build
- name: gcr.io/cloud-builders/docker
args:
- push
- >-
$_AR_HOSTNAME/$PROJECT_ID/cloud-run-source-deploy/$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=$_AR_HOSTNAME/$PROJECT_ID/cloud-run-source-deploy/$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
- '--region=$_DEPLOY_REGION'
- '--quiet'
id: Deploy
entrypoint: gcloud
images:
- >-
$_AR_HOSTNAME/$PROJECT_ID/cloud-run-source-deploy/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA
options:
substitutionOption: ALLOW_LOOSE
logging: CLOUD_LOGGING_ONLY
substitutions:
_DEPLOY_REGION: asia-south1
_AR_HOSTNAME: asia-south1-docker.pkg.dev
_PLATFORM: managed
_TRIGGER_ID: 6f098bc3-ca01-452c-99b1-29b3f2519243
_SERVICE_NAME: tiara-test-web
tags:
- gcp-cloud-build-deploy-cloud-run
- gcp-cloud-build-deploy-cloud-run-managed
- tiara-test-web