Fix rdo_release for unmaintained branches

Only branches with stable/ as prefix were considered
but now we have branches even with different
prefix like unmaintained/, fix it to consider
such cases by using a generic filter instead of
assuming branch name starts with stable.

Change-Id: I967de13094ff6df46737a22d4e1758f9900dfbc9
This commit is contained in:
yatinkarel 2024-06-21 18:27:32 +05:30
parent 9bcd7c240d
commit 4d69238383

View File

@ -307,8 +307,8 @@ function _install_rdo {
# rdo-release.el8.rpm points to latest RDO release, use that for master
sudo dnf -y install https://rdoproject.org/repos/rdo-release.el8.rpm
else
# For stable branches use corresponding release rpm
rdo_release=$(echo $TARGET_BRANCH | sed "s|stable/||g")
# For stable/unmaintained branches use corresponding release rpm
rdo_release=${TARGET_BRANCH#*/}
sudo dnf -y install https://rdoproject.org/repos/openstack-${rdo_release}/rdo-release-${rdo_release}.el8.rpm
fi
elif [[ $DISTRO == "rhel9" ]]; then
@ -316,8 +316,8 @@ function _install_rdo {
# rdo-release.el9.rpm points to latest RDO release, use that for master
sudo dnf -y install https://rdoproject.org/repos/rdo-release.el9.rpm
else
# For stable branches use corresponding release rpm
rdo_release=$(echo $TARGET_BRANCH | sed "s|stable/||g")
# For stable/unmaintained branches use corresponding release rpm
rdo_release=${TARGET_BRANCH#*/}
sudo dnf -y install https://rdoproject.org/repos/openstack-${rdo_release}/rdo-release-${rdo_release}.el9.rpm
fi
fi