Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 3 additions & 23 deletions 01_install_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,6 @@ if sudo systemctl is-active docker-distribution.service; then
sudo systemctl disable --now docker-distribution.service
fi

# Install oc client - unless we're in openshift CI
if [[ -z "$OPENSHIFT_CI" ]]; then
if [[ "$OPENSHIFT_RELEASE_TYPE" == "ga" ]]; then
oc_version=${OPENSHIFT_RELEASE_STREAM}
elif [[ "$OPENSHIFT_VERSION" == "4.7" ]]; then
oc_version="latest"
else
oc_version=${OPENSHIFT_VERSION}
fi

oc_tools_dir="${WORKING_DIR}/oc/${OPENSHIFT_VERSION}"
oc_tools_local_file=openshift-client-${oc_version}.tar.gz
oc_download_url="https://mirror.openshift.com/pub/openshift-v4/clients/oc/${oc_version}/linux/oc.tar.gz"
mkdir -p ${oc_tools_dir}
pushd ${oc_tools_dir}
if [ ! -f "${oc_tools_local_file}" ]; then
curl -L -o ${oc_tools_local_file} ${oc_download_url}
tar xvzf ${oc_tools_local_file}
fi
sudo cp oc /usr/local/bin/
oc version --client -o json
popd
fi
curl --retry 5 "$OPENSHIFT_CLIENT_TOOLS_URL" | sudo tar -U -C /usr/local/bin -xzf -
sudo chmod +x /usr/local/bin/oc
oc version --client -o json
2 changes: 2 additions & 0 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ export REGISTRY_CRT=registry.2.crt
# Set this variable to build the installer from source
export KNI_INSTALL_FROM_GIT=${KNI_INSTALL_FROM_GIT:-}

export OPENSHIFT_CLIENT_TOOLS_URL=https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz

export OPENSHIFT_RELEASE_TYPE=${OPENSHIFT_RELEASE_TYPE:-nightly}
export OPENSHIFT_RELEASE_STREAM=${OPENSHIFT_RELEASE_STREAM:-4.7}
if [[ "$OPENSHIFT_RELEASE_TYPE" == "ga" ]]; then
Expand Down