-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
43 lines (39 loc) · 1.26 KB
/
cloudbuild.yaml
File metadata and controls
43 lines (39 loc) · 1.26 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
steps:
- id: build-mpcd-mpc
name: golang:1.26-alpine
entrypoint: sh
args:
- -c
- |
apk add --no-cache gcc musl-dev git
git config --global url."https://${_GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
export GOPRIVATE=github.com/luxfi/*,github.com/hanzoai/*
CGO_ENABLED=0 go build -ldflags="-s -w" -o /workspace/mpcd ./cmd/mpcd
CGO_ENABLED=0 go build -ldflags="-s -w" -o /workspace/mpc ./cmd/mpc
- id: image
name: gcr.io/cloud-builders/docker
entrypoint: sh
args:
- -c
- |
cat > /workspace/Dockerfile.slim <<'DOCKER'
FROM alpine:3.21
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
COPY mpcd /usr/local/bin/mpcd
COPY mpc /usr/local/bin/mpc
EXPOSE 8081 9800 9999
ENTRYPOINT ["mpcd"]
DOCKER
docker build -t us-docker.pkg.dev/onyxplus-devnet/backend/mpc:v1.1.4 -f /workspace/Dockerfile.slim /workspace
waitFor: [build-mpcd-mpc]
- id: push
name: gcr.io/cloud-builders/docker
args: [push, us-docker.pkg.dev/onyxplus-devnet/backend/mpc:v1.1.4]
waitFor: [image]
substitutions:
_GITHUB_TOKEN: ''
options:
machineType: E2_HIGHCPU_8
logging: CLOUD_LOGGING_ONLY
timeout: 900s