summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xci/file/install-ansible.sh22
-rw-r--r--xci/playbooks/configure-opnfvhost.yml2
-rwxr-xr-xxci/scripts/vm/start-new-vm.sh3
-rwxr-xr-xxci/xci-deploy.sh2
4 files changed, 17 insertions, 12 deletions
diff --git a/xci/file/install-ansible.sh b/xci/file/install-ansible.sh
index 85d02d09..ca7763ad 100644
--- a/xci/file/install-ansible.sh
+++ b/xci/file/install-ansible.sh
@@ -14,9 +14,10 @@ CHECK_CMD_PKGS=(
python-devel
)
-# Check zypper before apt-get in case zypper-aptitude
-# is installed
-if [ -x '/usr/bin/zypper' ]; then
+source /etc/os-release || source /usr/lib/os-release
+
+case ${ID,,} in
+ *suse)
OS_FAMILY="Suse"
INSTALLER_CMD="sudo -H -E zypper install -y"
CHECK_CMD="zypper search --match-exact --installed"
@@ -39,7 +40,9 @@ if [ -x '/usr/bin/zypper' ]; then
if $(${CHECK_CMD} patterns-openSUSE-minimal_base-conflicts &> /dev/null); then
sudo -H zypper remove -y patterns-openSUSE-minimal_base-conflicts
fi
-elif [ -x '/usr/bin/apt-get' ]; then
+ ;;
+
+ ubuntu|debian)
OS_FAMILY="Debian"
INSTALLER_CMD="sudo -H -E apt-get -y install"
CHECK_CMD="dpkg -l"
@@ -56,7 +59,9 @@ elif [ -x '/usr/bin/apt-get' ]; then
)
EXTRA_PKG_DEPS=()
sudo apt-get update
-elif [ -x '/usr/bin/dnf' ] || [ -x '/usr/bin/yum' ]; then
+ ;;
+
+ rhel|centos|fedora)
OS_FAMILY="RedHat"
PKG_MANAGER=$(which dnf || which yum)
INSTALLER_CMD="sudo -H -E ${PKG_MANAGER} -y install"
@@ -75,9 +80,10 @@ elif [ -x '/usr/bin/dnf' ] || [ -x '/usr/bin/yum' ]; then
)
sudo yum update --assumeno
EXTRA_PKG_DEPS=()
-else
- echo "ERROR: Supported package manager not found. Supported: apt,yum,zypper"
-fi
+ ;;
+
+ *) echo "ERROR: Supported package manager not found. Supported: apt,yum,zypper"; exit 1;;
+esac
if ! $(python --version &>/dev/null); then
${INSTALLER_CMD} ${PKG_MAP[python]}
diff --git a/xci/playbooks/configure-opnfvhost.yml b/xci/playbooks/configure-opnfvhost.yml
index b6dbbb13..7b168498 100644
--- a/xci/playbooks/configure-opnfvhost.yml
+++ b/xci/playbooks/configure-opnfvhost.yml
@@ -143,12 +143,10 @@
name: "{{ docker_package_name }}"
state: latest
when: lookup('env', 'JENKINS_HOME') != ""
- # install python-openstackclient on opnfv host only if we are running as part of CI
- name: install python-openstackclient
pip:
name: python-openstackclient
state: present
- when: lookup('env', 'JENKINS_HOME') != ""
- hosts: localhost
remote_user: root
diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh
index 65133edc..45ece743 100755
--- a/xci/scripts/vm/start-new-vm.sh
+++ b/xci/scripts/vm/start-new-vm.sh
@@ -198,7 +198,8 @@ if [[ $? != 0 ]]; then
echo "Creating a default test case to run xci-deploy.sh"
cat > ${BASE_PATH}/run_jenkins_test.sh <<EOF
#!/bin/bash
-cd releng-xci/xci
+export XCI_FLAVOR=mini
+cd ~/releng-xci/xci
./xci-deploy.sh
EOF
# Copy again
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh
index fd3849be..90133f8d 100755
--- a/xci/xci-deploy.sh
+++ b/xci/xci-deploy.sh
@@ -44,7 +44,7 @@ fi
#-------------------------------------------------------------------------------
# Sanitize local development environment variables
#-------------------------------------------------------------------------------
-user_local_dev_vars=(OPNFV_RELENG_DEV_PATH OPNFV_OSA_DEV_PATH OPNFV_BIFROST_DEV_PATH)
+user_local_dev_vars=(OPNFV_RELENG_DEV_PATH OPENSTACK_OSA_DEV_PATH OPENSTACK_BIFROST_DEV_PATH)
for local_user_var in ${user_local_dev_vars[@]}; do
[[ -n ${!local_user_var:-} ]] && export $local_user_var=${!local_user_var%/}/
done