-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
39 lines (33 loc) · 1.37 KB
/
cloudbuild.yaml
File metadata and controls
39 lines (33 loc) · 1.37 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
steps:
# Build the container image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'us-central1-docker.pkg.dev/repcore-prod/docs-repo/website-docs:$COMMIT_SHA', '.']
# Push the container image to Artifact Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'us-central1-docker.pkg.dev/repcore-prod/docs-repo/website-docs:$COMMIT_SHA']
# Deploy container image to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args:
- 'run'
- 'deploy'
- 'website-docs'
- '--image'
- 'us-central1-docker.pkg.dev/repcore-prod/docs-repo/website-docs:$COMMIT_SHA'
- '--region'
- 'us-central1'
- '--platform'
- 'managed'
# Also tag as latest for convenience
- name: 'gcr.io/cloud-builders/docker'
args: ['tag',
'us-central1-docker.pkg.dev/repcore-prod/docs-repo/website-docs:$COMMIT_SHA',
'us-central1-docker.pkg.dev/repcore-prod/docs-repo/website-docs:latest']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'us-central1-docker.pkg.dev/repcore-prod/docs-repo/website-docs:latest']
# Store images in Artifact Registry
images:
- 'us-central1-docker.pkg.dev/repcore-prod/docs-repo/website-docs:$COMMIT_SHA'
- 'us-central1-docker.pkg.dev/repcore-prod/docs-repo/website-docs:latest'
# Set a longer timeout for the build
timeout: '1200s'