File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed
Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ # See https://cloud.google.com/cloud-build/docs/build-config
2+
3+ # this must be specified in seconds. If omitted, defaults to 600s (10 mins)
4+ timeout : 3000s
5+ steps :
6+ - name : gcr.io/cloud-builders/docker
7+ args :
8+ - build
9+ - --tag=gcr.io/$PROJECT_ID/scheduler:$_GIT_TAG
10+ - --tag=gcr.io/$PROJECT_ID/scheduler:latest
11+ - -f=./scheduler/Dockerfile
12+ - ./scheduler/
13+ substitutions :
14+ _GIT_TAG : ' 12345'
15+ _PULL_BASE_REF : ' master'
16+ # this prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF,
17+ # or any new substitutions added in the future.
18+ options :
19+ substitution_option : ALLOW_LOOSE
20+ # this will push these images, or cause the build to fail if they weren't built.
21+ images :
22+ - ' gcr.io/$PROJECT_ID/scheduler:$_GIT_TAG'
23+ - ' gcr.io/$PROJECT_ID/scheduler:latest'
Original file line number Diff line number Diff line change 1+ FROM golang:1.21 AS build-env
2+
3+ ENV GOOS=linux
4+ ENV GOARCH=amd64
5+ ENV CGO_ENABLED=0
6+ ENV GO111MODULE=on
7+
8+ WORKDIR /go/src/kube-scheduler-wasm-extension
9+
10+ COPY go.mod go.sum ./
11+ RUN go mod download
12+
13+ COPY . .
14+ RUN go build -v -o ./bin/kube-scheduler-wasm-extension kube-scheduler-wasm-extension.go
15+
16+ FROM alpine:3.19.1
17+
18+ COPY --from=build-env /go/src/kube-scheduler-wasm-extension/bin/kube-scheduler-wasm-extension /kube-scheduler-wasm-extension
19+ RUN chmod a+x /kube-scheduler-wasm-extension
20+
21+ CMD ["/kube-scheduler-wasm-extension" ]
You can’t perform that action at this time.
0 commit comments