-
Notifications
You must be signed in to change notification settings - Fork 206
Expand file tree
/
Copy pathrelease_cloudbuild.yaml
More file actions
53 lines (42 loc) · 1.73 KB
/
release_cloudbuild.yaml
File metadata and controls
53 lines (42 loc) · 1.73 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
47
48
49
50
51
52
53
# This cloudbuild is run on the creation of new tags, which should signify releases.
steps:
# Build the container that will do the go build
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'builder', '-f', 'deploy/Dockerfile.build', '.']
# Do the go build for amd64
- name: 'builder'
args: ['make', 'cross']
env: ['GOARCH=amd64']
# Do the go build for arm64
- name: 'builder'
args: ['make', 'cross']
env: ['GOARCH=arm64']
# Do the go build for s390x
- name: 'builder'
args: ['make', 'cross']
env: ['GOARCH=s390x']
# Do the go build for s390x
- name: 'builder'
args: ['make', 'cross']
env: ['GOARCH=ppc64le']
# Upload to GCS
- name: 'gcr.io/cloud-builders/gcloud'
args: ['storage', 'cp', '--recursive', 'out/*', 'gs://container-structure-test/$TAG_NAME/']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['storage', 'cp', '--recursive', 'gs://container-structure-test/$TAG_NAME/*', 'gs://container-structure-test/latest/']
# Build the image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/gcp-runtimes/container-structure-test:$TAG_NAME',
'-f', 'deploy/Dockerfile', '.']
# Tag the image as latest
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'gcr.io/gcp-runtimes/container-structure-test:$TAG_NAME',
'gcr.io/gcp-runtimes/container-structure-test:latest']
# Build the debug image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/gcp-runtimes/container-structure-test:debug',
'-f', 'deploy/Dockerfile_debug', '.']
images:
- 'gcr.io/gcp-runtimes/container-structure-test:$TAG_NAME'
- 'gcr.io/gcp-runtimes/container-structure-test:latest'
- 'gcr.io/gcp-runtimes/container-structure-test:debug'