Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions tgrun/pkg/runner/vmi/embed/testhelpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,16 @@ function is_ubuntu_2404() {
return 1
}

# is_ubuntu_2604 returns 0 if the current distro is Ubuntu 26.04.
function is_ubuntu_2604() {
if grep '^ID=' /etc/os-release | grep -qE '(ubuntu)' ; then
if grep '^VERSION_ID=' /etc/os-release | grep -q '=*"26.04' ; then
return 0
fi
fi
return 1
}

function is_rhel_10_variant() {
if grep '^ID=' /etc/os-release | grep -qE '(centos|rhel|ol|rocky)' ; then
if grep '^VERSION_ID=' /etc/os-release | grep -q '=*"10' ; then
Expand Down Expand Up @@ -658,6 +668,15 @@ function ubuntu_2404_install_host_packages() {
fi
}

function ubuntu_2604_install_host_packages() {
local packages=("$@")
if is_ubuntu_2604 ; then
# install required host packages
apt update
apt install -y "${packages[@]}"
fi
}

function installer_host() {
if echo "$1" | grep -q "staging" ; then
echo "staging.kurl.sh"
Expand Down
Loading