-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Disaiah Bennett <[email protected]>
- Loading branch information
Showing
3 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Build the manager binary | ||
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS plugin-builder | ||
|
||
WORKDIR /workspace | ||
|
||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
|
||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
# Copy the go source | ||
COPY . . | ||
|
||
# Build | ||
RUN go build -a -o manager main.go | ||
|
||
# Use ubi-minimal as minimal base image to package the manager binary | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest | ||
WORKDIR / | ||
COPY --from=builder /workspace/manager . | ||
|
||
ENTRYPOINT ["/manager"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright Contributors to the Open Cluster Management project | ||
|
||
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS plugin-builder | ||
|
||
WORKDIR /workspace | ||
|
||
COPY api/ api/ | ||
COPY test/e2e/ test/e2e/ | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
|
||
RUN go install github.com/onsi/ginkgo/v2/ginkgo@latest | ||
RUN ginkgo build test/e2e | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest | ||
|
||
ENV KUBECONFIG "/opt/.kube/config" | ||
|
||
USER root | ||
|
||
WORKDIR / | ||
|
||
COPY --from=builder /workspace/test/e2e/e2e.test e2e.test | ||
|
||
ENTRYPOINT ["/e2e.test", "--ginkgo.v", "--ginkgo.junit-report=./results/e2e-results.xml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright Contributors to the Open Cluster Management project | ||
|
||
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS plugin-builder | ||
|
||
WORKDIR /workspace | ||
|
||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
|
||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
# Copy the go source | ||
COPY . . | ||
|
||
# Build | ||
RUN go build -a -o local-server testserver/main.go | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest | ||
|
||
WORKDIR / | ||
COPY --from=builder /workspace/local-server . | ||
COPY testserver/data/ data/ | ||
|
||
ENTRYPOINT ["/local-server"] |