mirror of
https://github.com/xcat2/confluent.git
synced 2026-10-20 14:45:45 +00:00
6c48cb4fad
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.
92 lines
2.3 KiB
Bash
Executable File
92 lines
2.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# Assemble the nightly bundle for one target: the packages, repository
|
|
# metadata so the directory also works as a dnf/zypper/apt repository, and
|
|
# an INSTALL.txt. Produces confluent-nightly-<target>.tar.gz in <outdir>.
|
|
#
|
|
# Usage: mkbundle.sh <target> <version> <outdir> <package file>...
|
|
# target is <el9|el10|suse16|noble|resolute>-<arch>
|
|
set -e
|
|
|
|
TARGET=$1
|
|
VERSION=$2
|
|
OUTDIR=$(readlink -f "$3")
|
|
shift 3
|
|
|
|
NAME=confluent-nightly-$TARGET
|
|
DIR=$OUTDIR/$NAME
|
|
REPO=${GITHUB_REPOSITORY:-xcat2/confluent}
|
|
SHA=${GITHUB_SHA:-$(git rev-parse HEAD)}
|
|
rm -rf "$DIR"
|
|
mkdir -p "$DIR"
|
|
cp "$@" "$DIR"/
|
|
echo "$VERSION" > "$DIR"/VERSION
|
|
|
|
cat > "$DIR"/INSTALL.txt <<EOF
|
|
confluent nightly $VERSION ($TARGET)
|
|
|
|
Unofficial development build of https://github.com/$REPO
|
|
commit $SHA. Packages are unsigned. Not meant for production.
|
|
|
|
EOF
|
|
|
|
case "$TARGET" in
|
|
el*)
|
|
createrepo_c -q "$DIR"
|
|
cat >> "$DIR"/INSTALL.txt <<EOF
|
|
Dependencies come from the distribution plus EPEL and CRB:
|
|
|
|
dnf install epel-release
|
|
crb enable
|
|
|
|
Install everything:
|
|
|
|
dnf install ./$NAME/*.rpm
|
|
|
|
or only some of it, using the directory as a repository:
|
|
|
|
dnf install --repofrompath=confluent-nightly,\$PWD/$NAME \\
|
|
--setopt=confluent-nightly.gpgcheck=0 confluent_server
|
|
EOF
|
|
;;
|
|
suse*)
|
|
createrepo_c -q "$DIR"
|
|
cat >> "$DIR"/INSTALL.txt <<EOF
|
|
Install everything:
|
|
|
|
zypper --no-gpg-checks install --allow-unsigned-rpm ./$NAME/*.rpm
|
|
|
|
or only some of it, using the directory as a repository:
|
|
|
|
zypper addrepo --no-gpgcheck \$PWD/$NAME confluent-nightly
|
|
zypper install confluent_server
|
|
EOF
|
|
;;
|
|
noble*|resolute*)
|
|
(cd "$DIR" && dpkg-scanpackages --multiversion . /dev/null 2> /dev/null | gzip -9 > Packages.gz)
|
|
cat >> "$DIR"/INSTALL.txt <<EOF
|
|
Install everything:
|
|
|
|
apt install ./$NAME/*.deb
|
|
|
|
or only some of it, using the directory as a repository:
|
|
|
|
echo "deb [trusted=yes] file:\$PWD/$NAME ./" > /etc/apt/sources.list.d/confluent-nightly.list
|
|
apt update && apt install confluent-server
|
|
EOF
|
|
;;
|
|
*)
|
|
echo "unknown target $TARGET" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
cat >> "$DIR"/INSTALL.txt <<EOF
|
|
|
|
The bundle carries the osdeploy support for both x86_64 and aarch64
|
|
deployment targets. Genesis (confluent-genesis-*) is not built yet.
|
|
EOF
|
|
|
|
tar -C "$OUTDIR" -czf "$OUTDIR/$NAME.tar.gz" "$NAME"
|
|
rm -rf "$DIR"
|
|
echo "$OUTDIR/$NAME.tar.gz"
|