diff --git a/build/Dockerfile.ci b/build/Dockerfile.ci index b76fb42ae4..2f63891f1d 100644 --- a/build/Dockerfile.ci +++ b/build/Dockerfile.ci @@ -10,13 +10,6 @@ WORKDIR /build/ # dos2unix is needed to build CNI plugins RUN yum install -y dos2unix -# Download client binaries -# TODO: Remove this, see https://issues.redhat.com/browse/WINC-520 -RUN curl -L -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.6.4/openshift-client-linux-4.6.4.tar.gz -o openshift-origin-client-tools.tar.gz \ - && echo "c1f39a966fc0dbd4f8f0bfec0196149d54e0330de523bf906bbe2728b10a860b openshift-origin-client-tools.tar.gz" | sha256sum -c \ - && tar -xzf openshift-origin-client-tools.tar.gz \ - && rm -rf ./{kubectl,openshift*,README.md} - # The source here corresponds to the code in the PR and is placed here by the CI infrastructure. WORKDIR /build/windows-machine-config-operator/ # Copy .git metadata so that we can generate the version for the WMCO binary @@ -174,10 +167,6 @@ ENV OPERATOR=/usr/local/bin/windows-machine-config-operator \ # jq is needed in e2e test script to count the number of data items in the windows-instances ConfigMap RUN yum install -y jq -# Install client binaries -COPY --from=build /build/oc /usr/bin/oc -RUN oc version - # Copy the source code to be used by our ci infra WORKDIR /go/src/github.com/openshift/windows-machine-config-operator/ COPY --from=build /build/windows-machine-config-operator . diff --git a/hack/run-ci-e2e-test.sh b/hack/run-ci-e2e-test.sh index 67ee43afc8..3bfb25bfa5 100755 --- a/hack/run-ci-e2e-test.sh +++ b/hack/run-ci-e2e-test.sh @@ -3,6 +3,17 @@ set -o errexit set -o nounset set -o pipefail +# This script depends on the oc client. In CI, the oc cli is injected according +# to the given OCP version. See https://github.com/openshift/release/pull/26395 +# ensure oc client is available +which oc || { + # fails otherwise + echo "cannot find oc binary in PATH" + exit 1 +} +# print oc client version +oc version + # If ARTIFACT_DIR is not set, create a temp directory for artifacts ARTIFACT_DIR=${ARTIFACT_DIR:-} if [ -z "$ARTIFACT_DIR" ]; then