-
Notifications
You must be signed in to change notification settings - Fork 8
/
cloudbuild_docker_legacy.yaml
46 lines (43 loc) · 1.39 KB
/
cloudbuild_docker_legacy.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
44
45
46
# This cloudbuild script builds docker images we expect users to
# commonly deploy, and stores these in artifact registry.
# This builds the images multi-arch so they run on x64 and Raspberry Pi.
timeout: 3600s
options:
machineType: E2_HIGHCPU_32
volumes:
- name: go-modules
path: /go
env:
- GOPROXY=https://proxy.golang.org
- PROJECT_ROOT=github.com/transparency-dev/witness
- GOPATH=/go
- 'DOCKER_CLI_EXPERIMENTAL=enabled'
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['run', '--privileged', 'linuxkit/binfmt:v0.8']
id: 'initialize-qemu'
- name: 'gcr.io/cloud-builders/docker'
args: ['buildx', 'create', '--name', 'mybuilder']
id: 'create-builder'
- name: 'gcr.io/cloud-builders/docker'
args: ['buildx', 'use', 'mybuilder']
id: 'select-builder'
- name: 'gcr.io/cloud-builders/docker'
args: ['buildx', 'inspect', '--bootstrap']
id: 'show-target-build-platforms'
- name: 'gcr.io/cloud-builders/docker'
args: [
'buildx',
'build',
'--platform', '$_DOCKER_BUILDX_PLATFORMS',
'-t', 'gcr.io/trillian-opensource-ci/omniwitness:latest',
'--cache-from', 'gcr.io/trillian-opensource-ci/omniwitness:latest',
'-f', './cmd/omniwitness/Dockerfile',
'--push',
'.'
]
waitFor:
- show-target-build-platforms
id: 'build-omniwitness-image'
substitutions:
_DOCKER_BUILDX_PLATFORMS: 'linux/amd64'