FROM openshift/golang-builder:1.13 AS builder
ENV __doozer=update BUILD_RELEASE=202006290400.p0 BUILD_VERSION=v4.4.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=4 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.4.0-202006290400.p0 
ENV __doozer=merge OS_GIT_COMMIT=a7c9923 OS_GIT_VERSION=4.4.0-202006290400.p0-a7c9923 SOURCE_DATE_EPOCH=1590120222 SOURCE_GIT_COMMIT=a7c99236c613a53448f85f5fe1d5fe18a8bc9829 SOURCE_GIT_TAG=v0.0.0-beta1-50-ga7c9923 SOURCE_GIT_URL=https://github.com/openshift/cluster-api-provider-gcp 
WORKDIR /go/src/github.com/openshift/cluster-api-provider-gcp
COPY . .
# VERSION env gets set in the openshift/release image and refers to the golang version, which interfers with our own
RUN unset VERSION \
 && make build GOPROXY=off NO_DOCKER=1 CGO_ENABLED=0

FROM openshift/ose-base:v4.4.0.20200629.040018
ENV __doozer=update BUILD_RELEASE=202006290400.p0 BUILD_VERSION=v4.4.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=4 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.4.0-202006290400.p0 
ENV __doozer=merge OS_GIT_COMMIT=a7c9923 OS_GIT_VERSION=4.4.0-202006290400.p0-a7c9923 SOURCE_DATE_EPOCH=1590120222 SOURCE_GIT_COMMIT=a7c99236c613a53448f85f5fe1d5fe18a8bc9829 SOURCE_GIT_TAG=v0.0.0-beta1-50-ga7c9923 SOURCE_GIT_URL=https://github.com/openshift/cluster-api-provider-gcp 
COPY --from=builder /go/src/github.com/openshift/cluster-api-provider-gcp/bin/manager /
COPY --from=builder /go/src/github.com/openshift/cluster-api-provider-gcp/bin/machine-controller-manager /

LABEL \
        name="openshift/ose-gcp-machine-controllers" \
        com.redhat.component="ose-gcp-machine-controllers-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        release="202006290400.p0" \
        io.openshift.build.commit.id="a7c99236c613a53448f85f5fe1d5fe18a8bc9829" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-api-provider-gcp" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-api-provider-gcp/commit/a7c99236c613a53448f85f5fe1d5fe18a8bc9829" \
        version="v4.4.0"

