sos_testing/do_autopkg_tests.sh

41 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
#set -ax
latest_dev_series="oracular"
latest_sup_series="noble"
non_lts_releases="mantic"
all_series="focal jammy noble ${non_lts_releases} ${latest_dev_series}"
ppa_user="arif-ali"
ppa_name="sosreport-dev"
for distro in ${all_series}
do
inst_name=sos-avocado01-${distro}
if [[ "${distro}" == "${latest_dev_series}" ]] ; then
image="ubuntu-daily:${distro}"
else
image="ubuntu:${distro}"
fi
image_list="$(lxc image list --format json | jq -rc '.[] | select(.aliases[].name | contains("autopkgtest")) | .aliases[].name' | xargs)"
if [[ $(echo ${image_list} | grep -v "autopkgtest/ubuntu/${distro}/amd64/vm") ]] ; then
autopkgtest-build-lxd --vm ${image}
fi
rm -rf ${distro}-sosreport-ppa
autopkgtest \
--apt-upgrade --shell-fail --output-dir \
${distro}-sosreport-ppa --no-built-binaries \
--ignore-restrictions=isolation-machine \
--setup-commands="sudo apt -y install software-properties-common ; \
sudo add-apt-repository -y -u -s ppa:${ppa_user}/${ppa_name}" \
sosreport -- lxd autopkgtest/ubuntu/${distro}/amd64/vm
done