2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-10-20 14:45:45 +00:00
Files
confluent/.github/scripts/build-osdeploy.sh
T
Markus Hilger 6c48cb4fad Build and publish nightly packages
Build the rpms for EL9, EL10 and SUSE 16 and the debs for Ubuntu noble
and resolute, each for x86_64 and aarch64, install every set on a clean
container and publish them as a rolling nightly pre-release. Each
release asset is one target's bundle: all of its packages, repository
metadata and an INSTALL.txt.

Besides the in-tree components this packages confluent_ipxe from the
iPXE release roms and the browserfs and vinz helpers from their own
repositories. The osdeploy utils are built where buildrpm builds them,
el7 for the x86_64 el8bin set, so they still run on the oldest targets.
Genesis is left out for now.

Noarch packages are built once, in the x86_64 legs, and the aarch64 legs
build only what is architecture specific. Build tools are installed
without weak dependencies, while the smoke tests keep the distribution
defaults, since they stand in for a user's install.

Scheduled runs skip the build when neither confluent nor the helper
repositories moved since the last published nightly. Pull requests that
touch the packaging build and test without publishing.
2026-10-15 20:12:49 +02:00

41 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# Build the confluent_osdeploy rpm the way confluent_osdeploy/buildrpm and
# buildrpm-aarch64 do, but from utils binaries built by earlier CI jobs
# (build-utils.sh) instead of compiling them in local podman containers.
#
# Usage: build-osdeploy.sh <x86_64|aarch64> <el8utils-dir> <el9utils-dir>
set -e
ARCH=$1
EL8UTILS=$(readlink -f "$2")
EL9UTILS=$(readlink -f "$3")
cd "$(dirname "$0")/../.."
VERSION=$(./mkversion --tilde)
case "$ARCH" in
x86_64) SPEC=confluent_osdeploy.spec ;;
aarch64) SPEC=confluent_osdeploy-aarch64.spec ;;
*) echo "unknown arch $ARCH" >&2; exit 1 ;;
esac
sed -e "s/#VERSION#/$VERSION/" confluent_osdeploy/$SPEC.tmpl > confluent_osdeploy/$SPEC
mkdir -p ~/rpmbuild/SOURCES
cp LICENSE confluent_osdeploy/
tar Jcf ~/rpmbuild/SOURCES/confluent_osdeploy.tar.xz confluent_osdeploy
for gen in el8 el9; do
utils=$EL8UTILS
[ "$gen" = el9 ] && utils=$EL9UTILS
rm -rf ${gen}bin
mkdir -p ${gen}bin/opt/confluent/bin ${gen}bin/stateless-bin
(cd "$utils" && cp confluent_imginfo copernicus clortho autocons "$OLDPWD"/${gen}bin/opt/confluent/bin/)
(cd "$utils" && cp start_root urlmount "$OLDPWD"/${gen}bin/stateless-bin/)
# artifact downloads lose the execute bit
chmod 755 ${gen}bin/opt/confluent/bin/* ${gen}bin/stateless-bin/*
tar Jcf ~/rpmbuild/SOURCES/confluent_${gen}bin.tar.xz ${gen}bin/
rm -rf ${gen}bin
done
rpmbuild -ba confluent_osdeploy/$SPEC