Merge pull request #105 from chavafg/topic/fix-centos-setup

CI: use yum for resolving centos dependencies
This commit is contained in:
Salvador Fuentes
2018-06-06 14:00:21 -05:00
committed by GitHub
2 changed files with 13 additions and 5 deletions

View File

@@ -23,3 +23,8 @@ run_static_checks()
clone_tests_repo
bash "$tests_repo_dir/.ci/static-checks.sh"
}
install_bats()
{
bash "$tests_repo_dir/.ci/install_bats.sh"
}

View File

@@ -8,20 +8,23 @@
set -e
cidir=$(dirname "$0")
source "${cidir}/lib.sh"
bash "${cidir}/static-checks.sh"
#Note: If add clearlinux as supported CI use a stateless os-release file
source /etc/os-release
install_bats
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
sudo -E dnf -y install automake bats yamllint coreutils moreutils
sudo -E yum -y install epel-release
sudo -E yum -y install automake yamllint coreutils moreutils
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 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
else
echo "Linux distribution not supported"