forked from getsentry/sentry-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
43 lines (43 loc) · 1.31 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
steps:
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: [
'-c',
'docker pull us.gcr.io/$PROJECT_ID/$REPO_NAME:builder || true',
]
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: [
'-c',
'docker pull us.gcr.io/$PROJECT_ID/$REPO_NAME:latest || true',
]
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'--target', 'builder',
'-t', 'us.gcr.io/$PROJECT_ID/$REPO_NAME:builder',
'--build-arg', 'COMMIT_SHA=$COMMIT_SHA',
'--build-arg', 'BRANCH_NAME=$BRANCH_NAME',
'--build-arg', 'BUILD_CONF=${_BUILD_CONF}',
'--cache-from', 'us.gcr.io/$PROJECT_ID/$REPO_NAME:builder',
'.'
]
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'-t', 'us.gcr.io/$PROJECT_ID/$REPO_NAME:latest',
'-t', 'us.gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA',
'--build-arg', 'COMMIT_SHA=$COMMIT_SHA',
'--build-arg', 'BRANCH_NAME=$BRANCH_NAME',
'--build-arg', 'BUILD_CONF=${_BUILD_CONF}',
'--cache-from', 'us.gcr.io/$PROJECT_ID/$REPO_NAME:builder',
'--cache-from', 'us.gcr.io/$PROJECT_ID/$REPO_NAME:latest',
'.'
]
images: [
'us.gcr.io/$PROJECT_ID/$REPO_NAME:builder',
'us.gcr.io/$PROJECT_ID/$REPO_NAME:latest',
'us.gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA',
]
timeout: 20m
logsBucket: 'gs://sentryio-cloudbuild-logs/sentry-docs'