# When bumping the Go version, don't forget to update the configuration of the
# CI jobs in openshift/release.
FROM openshift/golang-builder@sha256:ab1bfcb9d06b339cb767acb804e6aa82eb23cd0795e6f82af54e92c312a32777 AS builder
ENV __doozer=update BUILD_RELEASE=202201211922.p0.gf73e5fc.assembly.stream BUILD_VERSION=v4.7.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=7 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.7.0-202201211922.p0.gf73e5fc.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=f73e5fc OS_GIT_VERSION=4.7.0-202201211922.p0.gf73e5fc.assembly.stream-f73e5fc SOURCE_DATE_EPOCH=1628807902 SOURCE_GIT_COMMIT=f73e5fcb432e4b847cddec5ce8570f8c5c32e902 SOURCE_GIT_TAG=f73e5fc SOURCE_GIT_URL=https://github.com/openshift/cluster-baremetal-operator 
WORKDIR /go/src/github.com/openshift/cluster-baremetal-operator
COPY . .
RUN make cluster-baremetal-operator

FROM openshift/ose-base:v4.7.0-202201082234.p0.g0e45f63.assembly.stream
ENV __doozer=update BUILD_RELEASE=202201211922.p0.gf73e5fc.assembly.stream BUILD_VERSION=v4.7.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=7 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.7.0-202201211922.p0.gf73e5fc.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=f73e5fc OS_GIT_VERSION=4.7.0-202201211922.p0.gf73e5fc.assembly.stream-f73e5fc SOURCE_DATE_EPOCH=1628807902 SOURCE_GIT_COMMIT=f73e5fcb432e4b847cddec5ce8570f8c5c32e902 SOURCE_GIT_TAG=f73e5fc SOURCE_GIT_URL=https://github.com/openshift/cluster-baremetal-operator 
COPY --from=builder /go/src/github.com/openshift/cluster-baremetal-operator/bin/cluster-baremetal-operator /usr/bin/cluster-baremetal-operator
COPY --from=builder /go/src/github.com/openshift/cluster-baremetal-operator/manifests /manifests
ENTRYPOINT ["/usr/bin/cluster-baremetal-operator"]

LABEL \
        io.openshift.release.operator="true" \
        name="openshift/ose-cluster-baremetal-operator" \
        com.redhat.component="ose-cluster-baremetal-operator-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Bare Metal Hardware Provisioning" \
        io.openshift.maintainer.subcomponent="cluster-baremetal-operator" \
        release="202201211922.p0.gf73e5fc.assembly.stream" \
        io.openshift.build.commit.id="f73e5fcb432e4b847cddec5ce8570f8c5c32e902" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-baremetal-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-baremetal-operator/commit/f73e5fcb432e4b847cddec5ce8570f8c5c32e902" \
        version="v4.7.0"

