mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 16:57:18 +00:00
CI: Install bats from sources
CentOS and some versions of Ubuntu do not provide bats in their default repository. This change installs bats from sources. Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
This commit is contained in:
parent
6c8c60db8a
commit
9f84cc8f1c
@ -23,3 +23,8 @@ run_static_checks()
|
|||||||
clone_tests_repo
|
clone_tests_repo
|
||||||
bash "$tests_repo_dir/.ci/static-checks.sh"
|
bash "$tests_repo_dir/.ci/static-checks.sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_bats()
|
||||||
|
{
|
||||||
|
bash "$tests_repo_dir/.ci/install_bats.sh"
|
||||||
|
}
|
||||||
|
12
.ci/setup.sh
12
.ci/setup.sh
@ -8,20 +8,22 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
cidir=$(dirname "$0")
|
cidir=$(dirname "$0")
|
||||||
|
source "${cidir}/lib.sh"
|
||||||
|
|
||||||
bash "${cidir}/static-checks.sh"
|
bash "${cidir}/static-checks.sh"
|
||||||
|
|
||||||
#Note: If add clearlinux as supported CI use a stateless os-release file
|
#Note: If add clearlinux as supported CI use a stateless os-release file
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
|
|
||||||
|
install_bats
|
||||||
|
|
||||||
if [ "$ID" == fedora ];then
|
if [ "$ID" == fedora ];then
|
||||||
sudo -E dnf -y install automake bats yamllint coreutils moreutils
|
sudo -E dnf -y install automake yamllint coreutils moreutils
|
||||||
elif [ "$ID" == centos ];then
|
elif [ "$ID" == centos ];then
|
||||||
sudo -E yum -y install automake bats yamllint coreutils moreutils
|
sudo -E yum -y install automake yamllint coreutils moreutils
|
||||||
elif [ "$ID" == ubuntu ];then
|
elif [ "$ID" == ubuntu ];then
|
||||||
#bats isn't available for Ubuntu trusty, need for travis
|
|
||||||
sudo add-apt-repository -y ppa:duggan/bats
|
|
||||||
sudo apt-get -qq update
|
sudo apt-get -qq update
|
||||||
sudo apt-get install -y -qq automake bats qemu-utils python-pip coreutils moreutils
|
sudo apt-get install -y -qq automake qemu-utils python-pip coreutils moreutils
|
||||||
sudo pip install yamllint
|
sudo pip install yamllint
|
||||||
else
|
else
|
||||||
echo "Linux distribution not supported"
|
echo "Linux distribution not supported"
|
||||||
|
Loading…
Reference in New Issue
Block a user