Skip to content

Commit

Permalink
tests/container: add rhel support to rpm builds
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Schoen <[email protected]>
  • Loading branch information
andrewschoen authored and mergify[bot] committed Aug 30, 2024
1 parent 540fcf0 commit 7b361bf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/container/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

python=python3
url="https://github.com/samba-in-kubernetes/sambacc"
url="${SAMBACC_REPO_URL:-https://github.com/samba-in-kubernetes/sambacc}"
bdir="${SAMBACC_BUILD_DIR:-/var/tmp/build/sambacc}"
distname="${SAMBACC_DISTNAME}"
# use SAMBACC_BUILD_TASKS to limit build tasks if needed
Expand Down Expand Up @@ -93,6 +93,11 @@ task_sys_deps() {
info "detected centos (stream): ${OS_VER}"
use_centos=true
;;
rhel*)
info "detected rhel: ${OS_VER}"
use_centos=
use_rhel=true
;;
fedora*)
info "detected fedora: ${OS_VER}"
use_centos=
Expand Down Expand Up @@ -134,6 +139,9 @@ task_sys_deps() {
yum_args=(--enablerepo=crb)
pkgs+=(pyproject-rpm-macros)
fi
if [ "$use_rhel" ]; then
pkgs+=(pyproject-rpm-macros)
fi
"${dnf_cmd}" "${yum_args[@]}" install -y "${pkgs[@]}"
"${dnf_cmd}" clean all
}
Expand Down

0 comments on commit 7b361bf

Please sign in to comment.