File tree 8 files changed +21
-19
lines changed
8 files changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ script:
19
19
notifications :
20
20
email : false
21
21
22
+ before_deploy :
23
+ - ls bin | xargs -n1 -I{} mv bin/{} "bin/$(go env GOOS)-$(go env GOARCH)-{}"
22
24
deploy :
23
25
provider : releases
24
26
edge : true
Original file line number Diff line number Diff line change @@ -28,11 +28,11 @@ FROM openshift/origin-base
28
28
RUN mkdir /registry
29
29
WORKDIR /registry
30
30
31
- COPY --from=builder /src/bin/linux-amd64- initializer /bin/initializer
32
- COPY --from=builder /src/bin/linux-amd64- registry-server /bin/registry-server
33
- COPY --from=builder /src/bin/linux-amd64- configmap-server /bin/configmap-server
34
- COPY --from=builder /src/bin/linux-amd64- appregistry-server /bin/appregistry-server
35
- COPY --from=builder /src/bin/linux-amd64- opm /bin/opm
31
+ COPY --from=builder /src/bin/initializer /bin/initializer
32
+ COPY --from=builder /src/bin/registry-server /bin/registry-server
33
+ COPY --from=builder /src/bin/configmap-server /bin/configmap-server
34
+ COPY --from=builder /src/bin/appregistry-server /bin/appregistry-server
35
+ COPY --from=builder /src/bin/opm /bin/opm
36
36
COPY --from=builder /go/bin/grpc-health-probe /bin/grpc_health_probe
37
37
38
38
RUN chgrp -R 0 /registry && \
Original file line number Diff line number Diff line change 1
1
GOOS := $(shell go env GOOS)
2
2
GOARCH := $(shell go env GOARCH)
3
- CMDS := $(addprefix bin/$( GOOS ) - $( GOARCH ) - , $(shell ls ./cmd) )
3
+ CMDS := $(addprefix bin/, $(shell ls ./cmd) )
4
4
SPECIFIC_UNIT_TEST := $(if $(TEST ) ,-run $(TEST ) ,)
5
5
MOD_FLAGS := $(shell bash -c 'if [[ "$(shell go env GOFLAGS) " == "-mod=vendor" ]]; then echo ""; else echo "-mod=vendor"; fi')
6
6
@@ -9,7 +9,7 @@ MOD_FLAGS := $(shell bash -c 'if [[ "$(shell go env GOFLAGS)" == "-mod=vendor" ]
9
9
all : clean test build
10
10
11
11
$(CMDS ) :
12
- go build $(MOD_FLAGS ) $(extra_flags ) -o $@ ./cmd/$(shell basename $@ | cut -d- -f3- )
12
+ go build $(MOD_FLAGS ) $(extra_flags ) -o $@ ./cmd/$(notdir $@ )
13
13
14
14
build : clean $(CMDS )
15
15
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ COPY --from=builder /go/src/github.com/operator-framework/operator-registry/vend
22
22
RUN CGO_ENABLED=0 go install -a -tags netgo -ldflags "-w"
23
23
24
24
FROM scratch
25
- COPY --from=builder /go/src/github.com/operator-framework/operator-registry/bin/linux-amd64- appregistry-server /bin/appregistry-server
25
+ COPY --from=builder /go/src/github.com/operator-framework/operator-registry/bin/appregistry-server /bin/appregistry-server
26
26
COPY --from=probe-builder /go/bin/grpc-health-probe /bin/grpc_health_probe
27
27
EXPOSE 50051
28
28
ENTRYPOINT ["/bin/appregistry-server" ]
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ FROM quay.io/operator-framework/upstream-registry-builder:latest as builder
2
2
FROM busybox as userspace
3
3
4
4
FROM scratch
5
- COPY --from=builder /build/bin/linux-amd64- configmap-server /bin/configmap-server
6
- COPY --from=builder /build/bin/linux-amd64- opm /bin/opm
5
+ COPY --from=builder /build/bin/configmap-server /bin/configmap-server
6
+ COPY --from=builder /build/bin/opm /bin/opm
7
7
COPY --from=userspace /bin/cp /bin/cp
8
8
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
9
9
EXPOSE 50051
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ FROM quay.io/operator-framework/upstream-registry-builder AS builder
3
3
FROM scratch
4
4
LABEL operators.operatorframework.io.index.database.v1=./index.db
5
5
COPY database ./
6
- COPY --from=builder /build/bin/linux-amd64- opm /opm
6
+ COPY --from=builder /build/bin/opm /opm
7
7
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
8
8
EXPOSE 50051
9
9
ENTRYPOINT ["/opm" ]
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ COPY Makefile Makefile
10
10
COPY go.mod go.mod
11
11
RUN make static
12
12
RUN GRPC_HEALTH_PROBE_VERSION=v0.2.1 && \
13
- wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
13
+ wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-$(go env GOARCH) && \
14
14
chmod +x /bin/grpc_health_probe
15
15
16
16
FROM scratch
17
- COPY --from=builder /build/bin/linux-amd64- registry-server /registry-server
17
+ COPY --from=builder /build/bin/registry-server /registry-server
18
18
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
19
19
EXPOSE 50051
20
20
ENTRYPOINT ["/registry-server" ]
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ COPY Makefile Makefile
10
10
COPY go.mod go.mod
11
11
RUN make static
12
12
RUN GRPC_HEALTH_PROBE_VERSION=v0.2.1 && \
13
- wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
13
+ wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-$(go env GOARCH) && \
14
14
chmod +x /bin/grpc_health_probe
15
- RUN cp /build/bin/linux-amd64- opm /bin/opm && \
16
- cp /build/bin/linux-amd64- initializer /bin/initializer && \
17
- cp /build/bin/linux-amd64- appregistry-server /bin/appregistry-server && \
18
- cp /build/bin/linux-amd64- configmap-server /bin/configmap-server && \
19
- cp /build/bin/linux-amd64- registry-server /bin/registry-server
15
+ RUN cp /build/bin/opm /bin/opm && \
16
+ cp /build/bin/initializer /bin/initializer && \
17
+ cp /build/bin/appregistry-server /bin/appregistry-server && \
18
+ cp /build/bin/configmap-server /bin/configmap-server && \
19
+ cp /build/bin/registry-server /bin/registry-server
You can’t perform that action at this time.
0 commit comments