FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202103130248.p0 BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202103130248.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=c5ec858 OS_GIT_VERSION=4.6.0-202103130248.p0-c5ec858 SOURCE_DATE_EPOCH=1615414306 SOURCE_GIT_COMMIT=c5ec85841302bf4c93fbf2da860b96fea10e068d SOURCE_GIT_TAG=v0.0.0-alpha.0-595-gc5ec8584 SOURCE_GIT_URL=https://github.com/openshift/cluster-etcd-operator 
WORKDIR /go/src/github.com/openshift/cluster-etcd-operator
COPY . .
ENV GO_PACKAGE github.com/openshift/cluster-etcd-operator
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.6.0.20210313.033438
ENV __doozer=update BUILD_RELEASE=202103130248.p0 BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202103130248.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=c5ec858 OS_GIT_VERSION=4.6.0-202103130248.p0-c5ec858 SOURCE_DATE_EPOCH=1615414306 SOURCE_GIT_COMMIT=c5ec85841302bf4c93fbf2da860b96fea10e068d SOURCE_GIT_TAG=v0.0.0-alpha.0-595-gc5ec8584 SOURCE_GIT_URL=https://github.com/openshift/cluster-etcd-operator 
COPY --from=builder /go/src/github.com/openshift/cluster-etcd-operator/bindata/bootkube/bootstrap-manifests /usr/share/bootkube/manifests/bootstrap-manifests/
COPY --from=builder /go/src/github.com/openshift/cluster-etcd-operator/bindata/bootkube/config /usr/share/bootkube/manifests/config/
COPY --from=builder /go/src/github.com/openshift/cluster-etcd-operator/bindata/bootkube/manifests /usr/share/bootkube/manifests/manifests/
COPY --from=builder /go/src/github.com/openshift/cluster-etcd-operator/cluster-etcd-operator /usr/bin/
COPY manifests/ /manifests
COPY vendor/github.com/openshift/api/operator/v1/0000_12_etcd-operator_01_config.crd.yaml /manifests

LABEL \
        io.openshift.release.operator="true" \
        name="openshift/ose-cluster-etcd-operator" \
        com.redhat.component="cluster-etcd-operator-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Etcd" \
        release="202103130248.p0" \
        io.openshift.build.commit.id="c5ec85841302bf4c93fbf2da860b96fea10e068d" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-etcd-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-etcd-operator/commit/c5ec85841302bf4c93fbf2da860b96fea10e068d" \
        version="v4.6.0"

