ci: upload rpms built in RHEL 8 CDN buildroot into rhel-8-cdn directory
Let's explain how RPMs for RHEL are built: We use a subscribed RHEL 8.x machine and mock build these on it. Mock initializes its own buildroot based on the latest RHEL 8 CDN content, see[1]. This means that the minor version of the buildroot is independent of the minor version of the host. However, we currently upload RPMs to a directory whose name consists also of the minor version of the host. Our hosts are currently running RHEL 8.3 so the RPMs are uploaded into rhel-8.3 directory despite them being built in the RHEL 8.4 buildroot (RHEL 8 CDN buildroot specifically). This means that we cannot guarantee that they are installable on RHEL 8.3 which is weird. This commit adds a special case for hosts that run on subscribed RHEL and thus build RPMs in a buildroot constructed from RHEL CDN. These RPMs are now uploaded into rhel-8-cdn directory. This change more accurately reflects the way we build our RPMs and removes some confusion. Also, we need to bump osbuild commit so we have a version that already has the rhel-8-cdn change in it. [1]: https://github.com/rpm-software-management/mock/blob/main/mock-core-configs/etc/mock/templates/rhel-8.tpl#L37 Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
298526d2af
commit
3ec917062f
3 changed files with 22 additions and 3 deletions
|
|
@ -39,7 +39,7 @@ function setup_repo {
|
|||
sudo tee "/etc/yum.repos.d/${project}.repo" << EOF
|
||||
[${project}]
|
||||
name=${project} ${commit}
|
||||
baseurl=http://osbuild-composer-repos.s3-website.us-east-2.amazonaws.com/${project}/${ID}-${VERSION_ID}/${ARCH}/${commit}
|
||||
baseurl=http://osbuild-composer-repos.s3-website.us-east-2.amazonaws.com/${project}/${DISTRO_VERSION}/${ARCH}/${commit}
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
priority=${priority}
|
||||
|
|
@ -56,6 +56,15 @@ if [[ $ID == "rhel" && $VERSION_ID == "8.3" && -n "${RHN_REGISTRATION_SCRIPT:-}"
|
|||
sudo "$RHN_REGISTRATION_SCRIPT"
|
||||
fi
|
||||
|
||||
# Distro version that this script is running on.
|
||||
DISTRO_VERSION=${ID}-${VERSION_ID}
|
||||
|
||||
if [[ "$ID" == rhel ]] && sudo subscription-manager status; then
|
||||
# If this script runs on subscribed RHEL, install content built using CDN
|
||||
# repositories.
|
||||
DISTRO_VERSION=rhel-${VERSION_ID%.*}-cdn
|
||||
fi
|
||||
|
||||
greenprint "Enabling fastestmirror to speed up dnf 🏎️"
|
||||
echo -e "fastestmirror=1" | sudo tee -a /etc/dnf/dnf.conf
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue