forked from project-kessel/inventory-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-e2e
More file actions
31 lines (21 loc) · 711 Bytes
/
Dockerfile-e2e
File metadata and controls
31 lines (21 loc) · 711 Bytes
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
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7-1771346502 AS builder
ARG TARGETARCH
USER root
RUN microdnf install -y tar gzip make which gcc gcc-c++ cyrus-sasl-lib findutils git go-toolset
WORKDIR /workspace
COPY go.mod go.sum ./
ENV CGO_ENABLED 1
RUN go mod download
COPY api ./api
# Copy API files for gorm usage
COPY cmd ./cmd
COPY internal ./internal
COPY test/e2e .
RUN go mod tidy
RUN go test -c -o e2e-inventory-tests
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7-1771346502
COPY --from=builder /workspace/e2e-inventory-tests /usr/local/bin/
USER 1001
ENV PATH="$PATH:/usr/local/bin"
# Run the e2e tests
CMD ["./usr/local/bin/e2e-inventory-tests", "-test.v", "-test.parallel=1"]