Skip to content

Commit 3a6a4b5

Browse files
author
Adrian Reber
authored
Merge pull request #73 from openhpc/2026-05-14-docs
ci: support docs-ohpc download for OpenHPC 3.x and Leap
2 parents d5f2f0e + 8f3034d commit 3a6a4b5

1 file changed

Lines changed: 39 additions & 18 deletions

File tree

ansible/roles/test/files/support_functions.sh

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -689,26 +689,47 @@ install_doc_rpm() {
689689
fi
690690

691691
# Starting with OpenHPC 4.1, docs-ohpc is only built for EL_10.
692+
# Starting with OpenHPC 3.1, docs-ohpc is only built for EL_9.
692693
# When using the Factory repository on other distributions,
693-
# download the noarch RPM from the EL_10 Factory repository
694+
# download the noarch RPM from the appropriate Factory repository
694695
# and install it locally.
695-
if [[ "${Repo}" == "Factory" ]] && [[ "${os_repo}" != "EL_10" ]] &&
696-
{ [[ "${VERSION_MAJOR}" -eq 4 && "${VERSION_MINOR}" -ge 1 ]] ||
697-
[[ "${VERSION_MAJOR}" -gt 4 ]]; }; then
698-
local EL10_REPO_URL
699-
EL10_REPO_URL="http://obs.openhpc.community:82/OpenHPC${VERSION_MAJOR}:/${Version}:/Factory/EL_10/"
700-
echo "docs-ohpc is only built for EL_10, downloading from ${EL10_REPO_URL}"
701-
local DOCS_TMPDIR
702-
DOCS_TMPDIR=$(mktemp -d)
703-
loop_command dnf download -y \
704-
--repofrompath="ohpc-el10,${EL10_REPO_URL}" \
705-
--disablerepo='*' \
706-
--downloaddir="${DOCS_TMPDIR}" \
707-
--setopt="ohpc-el10.gpgcheck=0" \
708-
docs-ohpc
709-
"${PKG_MANAGER}" "${YES}" install "${DOCS_TMPDIR}"/docs-ohpc*.rpm ||
710-
ERROR "Unable to install docs-ohpc"
711-
rm -rf "${DOCS_TMPDIR}"
696+
local DOCS_EL=""
697+
if [[ "${Repo}" == "Factory" ]]; then
698+
if [[ "${os_repo}" != "EL_10" ]] &&
699+
{ [[ "${VERSION_MAJOR}" -eq 4 && "${VERSION_MINOR}" -ge 1 ]] ||
700+
[[ "${VERSION_MAJOR}" -gt 4 ]]; }; then
701+
DOCS_EL="EL_10"
702+
elif [[ "${os_repo}" != "EL_9" ]] &&
703+
[[ "${VERSION_MAJOR}" -eq 3 && "${VERSION_MINOR}" -ge 1 ]]; then
704+
DOCS_EL="EL_9"
705+
fi
706+
fi
707+
708+
if [[ -n "${DOCS_EL}" ]]; then
709+
local DOCS_REPO_URL
710+
DOCS_REPO_URL="http://obs.openhpc.community:82/OpenHPC${VERSION_MAJOR}:/${Version}:/Factory/${DOCS_EL}/"
711+
echo "docs-ohpc is only built for ${DOCS_EL}, downloading from ${DOCS_REPO_URL}"
712+
if [[ "${DISTRIBUTION}" == "leap"* ]]; then
713+
zypper --non-interactive addrepo \
714+
--no-gpgcheck "${DOCS_REPO_URL}" ohpc-docs-temp
715+
loop_command zypper --non-interactive refresh ohpc-docs-temp
716+
zypper --non-interactive --no-gpg-checks install \
717+
--from ohpc-docs-temp docs-ohpc ||
718+
ERROR "Unable to install docs-ohpc"
719+
zypper --non-interactive removerepo ohpc-docs-temp
720+
else
721+
local DOCS_TMPDIR
722+
DOCS_TMPDIR=$(mktemp -d)
723+
loop_command dnf download -y \
724+
--repofrompath="ohpc-docs-temp,${DOCS_REPO_URL}" \
725+
--disablerepo='*' \
726+
--downloaddir="${DOCS_TMPDIR}" \
727+
--setopt="ohpc-docs-temp.gpgcheck=0" \
728+
docs-ohpc
729+
"${PKG_MANAGER}" "${YES}" install "${DOCS_TMPDIR}"/docs-ohpc*.rpm ||
730+
ERROR "Unable to install docs-ohpc"
731+
rm -rf "${DOCS_TMPDIR}"
732+
fi
712733
else
713734
install_package docs-ohpc
714735
fi

0 commit comments

Comments
 (0)