-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
23 lines (21 loc) · 943 Bytes
/
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
steps:
- id: 'build image'
name: 'gcr.io/cloud-builders/docker'
args: [ 'build',
'-t', 'gcr.io/${_PROJECT}/github.com/${_ACCOUNT}/${_IMAGE}:$SHORT_SHA',
'--build-arg', 'API_KEY=${_FIREBASE_API_KEY}',
'--build-arg', 'APP_NAME=${_FIREBASE_APP_ID}',
'--build-arg', 'GCP_PROJECT=${_PROJECT}',
'--build-arg', 'MESSAGING_SENDER_ID=${_FIREBASE_MESSAGING_SENDER_ID}',
'.' ]
- id: 'push image to artifactory'
name: 'gcr.io/cloud-builders/docker'
args: [ 'push', 'gcr.io/${_PROJECT}/github.com/${_ACCOUNT}/${_IMAGE}:$SHORT_SHA' ]
- id: 'cloud run deploy'
name: 'gcr.io/cloud-builders/gcloud'
args: [ 'run', 'deploy', '${_APP}',
'--region=${_REGION}',
'--port=443',
'--allow-unauthenticated',
'--platform=managed',
'--image=gcr.io/${_PROJECT}/github.com/${_ACCOUNT}/${_IMAGE}:$SHORT_SHA' ]