FROM openshift/golang-builder:1.12 AS builder
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=9 OS_GIT_VERSION=4.3.9-202003230345-d5ddbcd OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=d5ddbcdd4ec87bd4d0d109e81ed0be5dafd86061 SOURCE_GIT_TAG=d5ddbcdd SOURCE_GIT_URL=https://github.com/openshift/cluster-config-operator SOURCE_DATE_EPOCH=1575998074 OS_GIT_COMMIT=d5ddbcd BUILD_VERSION=v4.3.9 BUILD_RELEASE=202003230345
WORKDIR /go/src/github.com/openshift/cluster-config-operator
COPY . .
ENV GO_PACKAGE github.com/openshift/cluster-config-operator
RUN GODEBUG=tls13=1 go build -ldflags "-X $GO_PACKAGE/pkg/version.versionFromGit=$(git describe --long --tags --abbrev=7 --match 'v[0-9]*')" ./cmd/cluster-config-operator

FROM openshift/ose-base:v4.3.9.20200323.034557
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=9 OS_GIT_VERSION=4.3.9-202003230345-d5ddbcd OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=d5ddbcdd4ec87bd4d0d109e81ed0be5dafd86061 SOURCE_GIT_TAG=d5ddbcdd SOURCE_GIT_URL=https://github.com/openshift/cluster-config-operator SOURCE_DATE_EPOCH=1575998074 OS_GIT_COMMIT=d5ddbcd BUILD_VERSION=v4.3.9 BUILD_RELEASE=202003230345
RUN mkdir -p /usr/share/bootkube/manifests/manifests
RUN mkdir -p /usr/share/bootkube/manifests/bootstrap-manifests
COPY --from=builder /go/src/github.com/openshift/cluster-config-operator/vendor/github.com/openshift/api/config/v1/*.yaml /usr/share/bootkube/manifests/manifests
COPY --from=builder /go/src/github.com/openshift/cluster-config-operator/vendor/github.com/openshift/api/quota/v1/*.yaml /usr/share/bootkube/manifests/manifests
COPY --from=builder /go/src/github.com/openshift/cluster-config-operator/vendor/github.com/openshift/api/security/v1/*.yaml /usr/share/bootkube/manifests/manifests
COPY --from=builder /go/src/github.com/openshift/cluster-config-operator/vendor/github.com/openshift/api/authorization/v1/*.yaml /usr/share/bootkube/manifests/manifests
COPY --from=builder /go/src/github.com/openshift/cluster-config-operator/vendor/github.com/openshift/api/operator/v1alpha1/0000_10_config-operator_01_imagecontentsourcepolicy.crd.yaml /usr/share/bootkube/manifests/manifests
COPY --from=builder /go/src/github.com/openshift/cluster-config-operator/cluster-config-operator /usr/bin/
COPY manifests /manifests
COPY vendor/github.com/openshift/api/config/v1/*.yaml /manifests
COPY vendor/github.com/openshift/api/quota/v1/*.yaml /manifests
COPY vendor/github.com/openshift/api/security/v1/*.yaml /manifests
COPY vendor/github.com/openshift/api/authorization/v1/*.yaml /manifests
COPY vendor/github.com/openshift/api/operator/v1alpha1/0000_10_config-operator_01_imagecontentsourcepolicy.crd.yaml /manifests
COPY empty-resources /manifests

LABEL \
        io.openshift.release.operator="true" \
        name="openshift/ose-cluster-config-operator" \
        com.redhat.component="ose-cluster-config-operator-container" \
        version="v4.3.9" \
        release="202003230345" \
        io.openshift.build.commit.id="d5ddbcdd4ec87bd4d0d109e81ed0be5dafd86061" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-config-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-config-operator/commit/d5ddbcdd4ec87bd4d0d109e81ed0be5dafd86061"

