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
20 changes: 11 additions & 9 deletions test/kickstart-templates/includes/post-cos9rpm.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,19 @@ EOF

# The openshift-client dependency from OpenShift Mirror
# Only the released previous minor version is guaranteed to be available
# Excludes all to avoid unintentionally sourcing packages from here that
# should come from a centos repos.
OCPVERSION=4.REPLACE_PREVIOUS_MINOR_VERSION
# Do not remove the trailing slash in the URL or some downloads
# may fail depending on a region
OCC_SRC="https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/dependencies/rpms/${OCPVERSION}-el9-beta/"
OCC_LOC="$(mktemp -d /tmp/openshift-client-XXXXXXXX)"
OCPREPO="openshift-${OCPVERSION}-mirror"
cat > "/etc/yum.repos.d/${OCPREPO}.repo" <<EOF
[${OCPREPO}]
name=Openshift ${OCPVERSION} Mirror
baseurl="https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/dependencies/rpms/${OCPVERSION}-el9-beta/"
gpgcheck=0
enabled=1
EOF

dnf install -y wget
wget -r -nd -l 1 -A "openshift-clients-${OCPVERSION}*.rpm" -P "${OCC_LOC}" "${OCC_SRC}"
ls -l "${OCC_LOC}"/
dnf localinstall -y "${OCC_LOC}"/*.rpm
rm -rf "${OCC_LOC}"
dnf install -y openshift-clients

# The crio dependency from OKD copr repository
dnf copr enable -y @OKD/okd "centos-stream-9-$(uname -m)"
Expand Down