FROM openshift/golang-builder:1.12 AS builder
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=7 OS_GIT_VERSION=4.3.7-202003161611-0b20d60 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=0b20d6028556a34abf80e55b7b3c0c8ec469d29f SOURCE_GIT_TAG=0b20d602 SOURCE_GIT_URL=https://github.com/openshift/cluster-kube-controller-manager-operator SOURCE_DATE_EPOCH=1584139769 OS_GIT_COMMIT=0b20d60 BUILD_VERSION=v4.3.7 BUILD_RELEASE=202003161611
WORKDIR /go/src/github.com/openshift/cluster-kube-controller-manager-operator
COPY . .
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.3.7.20200316.161155
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=7 OS_GIT_VERSION=4.3.7-202003161611-0b20d60 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=0b20d6028556a34abf80e55b7b3c0c8ec469d29f SOURCE_GIT_TAG=0b20d602 SOURCE_GIT_URL=https://github.com/openshift/cluster-kube-controller-manager-operator SOURCE_DATE_EPOCH=1584139769 OS_GIT_COMMIT=0b20d60 BUILD_VERSION=v4.3.7 BUILD_RELEASE=202003161611
RUN mkdir -p /usr/share/bootkube/manifests/bootstrap-manifests/ /usr/share/bootkube/manifests/config/ /usr/share/bootkube/manifests/manifests/
COPY --from=builder /go/src/github.com/openshift/cluster-kube-controller-manager-operator/bindata/bootkube/bootstrap-manifests /usr/share/bootkube/manifests/bootstrap-manifests/
COPY --from=builder /go/src/github.com/openshift/cluster-kube-controller-manager-operator/bindata/bootkube/config /usr/share/bootkube/manifests/config/
COPY --from=builder /go/src/github.com/openshift/cluster-kube-controller-manager-operator/bindata/bootkube/manifests /usr/share/bootkube/manifests/manifests/
COPY --from=builder /go/src/github.com/openshift/cluster-kube-controller-manager-operator/cluster-kube-controller-manager-operator /usr/bin/
COPY manifests /manifests
COPY vendor/github.com/openshift/api/operator/v1/0000_25_kube-controller-manager-operator_01_config.crd.yaml /manifests

LABEL \
        io.openshift.release.operator="true" \
        name="openshift/ose-cluster-kube-controller-manager-operator" \
        com.redhat.component="ose-cluster-kube-controller-manager-operator-container" \
        version="v4.3.7" \
        release="202003161611" \
        io.openshift.build.commit.id="0b20d6028556a34abf80e55b7b3c0c8ec469d29f" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-kube-controller-manager-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-kube-controller-manager-operator/commit/0b20d6028556a34abf80e55b7b3c0c8ec469d29f"

