forked from imgproxy/imgproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
56 lines (50 loc) · 1.17 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
44
45
46
47
48
49
50
51
52
53
54
55
56
steps:
- id: 'docker_amd64'
name: 'docker'
entrypoint: 'sh'
args:
- '-c'
- |
docker build \
-t darthsim/imgproxy:$TAG_NAME-amd64 \
-f docker/Dockerfile \
--platform=linux/amd64 \
.
env:
- DOCKER_BUILDKIT=1
waitFor: ["-"]
- id: 'docker_arm64'
name: 'docker'
entrypoint: 'sh'
args:
- '-c'
- |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes \
&& docker build \
-t darthsim/imgproxy:$TAG_NAME-arm64 \
-f docker/Dockerfile \
--platform=linux/arm64/v8 \
.
env:
- DOCKER_BUILDKIT=1
waitFor: ["-"]
- id: 'push'
name: 'docker'
entrypoint: 'sh'
args:
- '-c'
- |
apk add --no-cache bash \
&& docker login -u darthsim -p $$DOCKER_HUB_TOKEN \
&& docker/push-images.sh ${TAG_NAME}
secretEnv: ['DOCKER_HUB_TOKEN']
waitFor: ['docker_amd64', 'docker_arm64']
availableSecrets:
secretManager:
- versionName: projects/${PROJECT_ID}/secrets/DOCKER_HUB_TOKEN/versions/latest
env: DOCKER_HUB_TOKEN
options:
machineType: 'N1_HIGHCPU_8'
logging: CLOUD_LOGGING_ONLY
dynamic_substitutions: true
timeout: 1200s