File tree Expand file tree Collapse file tree 1 file changed +21
-22
lines changed Expand file tree Collapse file tree 1 file changed +21
-22
lines changed Original file line number Diff line number Diff line change 1
- FROM quay.io/coreos/alm-ci:base as builder
1
+ FROM golang:1.12-alpine as builder
2
2
LABEL stage=builder
3
- WORKDIR /go/src/github.com/operator-framework/operator-lifecycle-manager
4
- RUN curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 -o /bin/jq
5
- RUN chmod +x /bin/jq
6
- # Cache Dep first
7
- COPY . .
3
+ WORKDIR /build
4
+
5
+ RUN apk update && apk add bash make git mercurial jq
6
+
7
+ # copy just enough of the git repo to parse HEAD, used to record version in OLM binaries
8
+ COPY .git/HEAD .git/HEAD
9
+ COPY .git/refs/heads/. .git/refs/heads
10
+ RUN mkdir -p .git/objects
11
+ COPY Makefile Makefile
12
+ COPY OLM_VERSION OLM_VERSION
13
+ COPY pkg pkg
14
+ COPY vendor vendor
15
+ COPY go.mod go.mod
16
+ COPY cmd cmd
17
+ COPY test test
8
18
RUN make build
9
- RUN go test -c -o /bin/e2e ./test/e2e/...
10
19
11
- FROM alpine:latest as olm
20
+ FROM alpine:latest
12
21
LABEL stage=olm
13
22
WORKDIR /
14
- COPY --from=builder /go/src/github.com/operator-framework/operator-lifecycle-manager /bin/olm /bin/olm
15
- COPY --from=builder /go/src/github.com/operator-framework/operator-lifecycle-manager /bin/catalog /bin/catalog
16
- COPY --from=builder /go/src/github.com/operator-framework/operator-lifecycle-manager /bin/package-server /bin/package-server
23
+ COPY --from=builder /build /bin/olm /bin/olm
24
+ COPY --from=builder /build /bin/catalog /bin/catalog
25
+ COPY --from=builder /build /bin/package-server /bin/package-server
17
26
EXPOSE 8080
18
27
EXPOSE 5443
19
- CMD ["/bin/olm" ]
20
-
21
- FROM quay.io/coreos/alm-ci:base
22
- LABEL stage=e2e
23
- RUN mkdir -p /var/e2e
24
- WORKDIR /var/e2e
25
- COPY --from=builder /bin/e2e /bin/e2e
26
- COPY --from=builder /bin/jq /bin/jq
27
- COPY ./test/e2e/e2e.sh /var/e2e/e2e.sh
28
- COPY ./test/e2e/tap.jq /var/e2e/tap.jq
29
- CMD ["/bin/e2e" ]
28
+ CMD ["/bin/olm" ]
You can’t perform that action at this time.
0 commit comments