From 137728334dc7fcc305122c9f2e13c7501f510bb5 Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Thu, 21 Jul 2016 16:39:16 +0200 Subject: [PATCH] Pick the correct fuel-qa branch depending on MOS When preparing the environment, the script will now pick up the correct fuel-qa branch that matches with the tested ISO unless the FUELQA_GITREF variable is already defined. Change-Id: I623a15803f339733ed8525d5c70667e83ddae2cf --- utils/fuel-qa-builder/prepare_env.sh | 21 ++++++++++++++++++++- utils/fuel-qa-builder/setup.py | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/utils/fuel-qa-builder/prepare_env.sh b/utils/fuel-qa-builder/prepare_env.sh index 62c8625..39f3f63 100755 --- a/utils/fuel-qa-builder/prepare_env.sh +++ b/utils/fuel-qa-builder/prepare_env.sh @@ -8,7 +8,26 @@ set -e # Initialize the variables BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" VENV_PATH=${VENV_PATH:-"${BASE_DIR}"/venv-stacklight-tests} -FUELQA_GITREF=${FUELQA_GITREF:-stable/mitaka} +if [ -z "${FUELQA_GITREF}" ]; then + if [ -z "${ISO_PATH}" ]; then + echo "ISO_PATH and FUELQA_GITREF are missing. Please specify at least one." + exit 1 + fi + # Pick up the correct fuel-qa branch depending on the ISO version + FUEL_VERSION=$(basename "${ISO_PATH}" | egrep -o '[0-9]+\.[0-9]+') + case "$FUEL_VERSION" in + 8.0) + FUELQA_GITREF="stable/8.0" + ;; + 9.0) + FUELQA_GITREF="stable/mitaka" + ;; + *) + echo "Don't know which fuel-qa branch to use for ${ISO_PATH}" + echo "Please specify it explicitly with the FUELQA_GITREF variable" + exit 1 + esac +fi # Create the virtual environment if it doesn't exist yet if [[ ! -f "$VENV_PATH"/bin/activate ]]; then diff --git a/utils/fuel-qa-builder/setup.py b/utils/fuel-qa-builder/setup.py index e343d0b..ee44dd3 100644 --- a/utils/fuel-qa-builder/setup.py +++ b/utils/fuel-qa-builder/setup.py @@ -17,7 +17,7 @@ def get_requirements_list(requirements): setup( name='fuelweb_test', - version=9.0, + version=1.0, description='Fuel-qa fuelweb package', url='http://www.openstack.org/',