-
Notifications
You must be signed in to change notification settings - Fork 96
/
Dockerfile.external
42 lines (34 loc) · 1.33 KB
/
Dockerfile.external
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
32
33
34
35
36
37
38
39
40
41
42
FROM registry.ci.openshift.org/openshift/release:golang-1.20 AS builder
ENV PKG=/go/src/github.com/integr8ly/integreatly-operator/
WORKDIR ${PKG}
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
COPY vendor ./vendor
COPY test ./test
# 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 apis/ apis/
COPY controllers/ controllers/
COPY pkg ./pkg
COPY manifests ./manifests
COPY version ./version
COPY utils ./utils
# copy make
COPY make ./make
COPY Makefile ./
# compile test binary
RUN make test/compile/functional
FROM registry.access.redhat.com/ubi9/ubi:latest
# Install chrome for tests
COPY test-dependency/*.repo /etc/yum.repos.d/
COPY build/bin/setup_external.sh ./setup_external.sh
RUN dnf -y install google-chrome-stable && dnf clean all
ENV WATCH_NAMESPACE=redhat-rhoam-operator
RUN mkdir test-run-results && \
curl -Ls https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/4.14.28/openshift-client-linux.tar.gz | tar -zx && \
mv oc /usr/local/bin
COPY --from=builder /go/src/github.com/integr8ly/integreatly-operator/integreatly-operator-test-harness.test integreatly-operator-test-harness.test
ENTRYPOINT [ "/bin/bash", "-c", "./setup_external.sh"]