-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild-addin.yaml
More file actions
46 lines (41 loc) · 1.33 KB
/
cloudbuild-addin.yaml
File metadata and controls
46 lines (41 loc) · 1.33 KB
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
steps:
# Build Add-In React image
- name: 'gcr.io/cloud-builders/docker'
id: 'build-addin'
args:
- 'build'
- '--cache-from'
- 'us-central1-docker.pkg.dev/$PROJECT_ID/fleetclaim/addin-react:latest'
- '-t'
- 'us-central1-docker.pkg.dev/$PROJECT_ID/fleetclaim/addin-react:$COMMIT_SHA'
- '-t'
- 'us-central1-docker.pkg.dev/$PROJECT_ID/fleetclaim/addin-react:latest'
- 'src/FleetClaim.AddIn.React'
# Push Add-In image
- name: 'gcr.io/cloud-builders/docker'
id: 'push-addin'
args: ['push', '--all-tags', 'us-central1-docker.pkg.dev/$PROJECT_ID/fleetclaim/addin-react']
waitFor: ['build-addin']
# Deploy Add-In to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
id: 'deploy-addin'
entrypoint: gcloud
args:
- 'run'
- 'deploy'
- 'fleetclaim-addin-react'
- '--image'
- 'us-central1-docker.pkg.dev/$PROJECT_ID/fleetclaim/addin-react:$COMMIT_SHA'
- '--region'
- 'us-central1'
- '--allow-unauthenticated'
- '--platform'
- 'managed'
waitFor: ['push-addin']
images:
- 'us-central1-docker.pkg.dev/$PROJECT_ID/fleetclaim/addin-react:$COMMIT_SHA'
- 'us-central1-docker.pkg.dev/$PROJECT_ID/fleetclaim/addin-react:latest'
options:
logging: CLOUD_LOGGING_ONLY
machineType: 'E2_HIGHCPU_8'
timeout: '600s'