Add SDK version to tests conditions

Pass SDK version to ansible roles so we can skip testing of modules
which are not supported for current SDK version

Change-Id: I5d25c0a6827536434a8f17b2a0f7de0db4c78301
This commit is contained in:
Sagi Shnaidman
2020-03-28 16:11:04 +03:00
parent a55f3fd1ca
commit 2753b5bc42
2 changed files with 9 additions and 2 deletions

View File

@@ -100,7 +100,12 @@ fi
tox -ebuild
ansible-galaxy collection build --force . --output-path ./build_artifact
ansible-galaxy collection install $(ls build_artifact/openstack-cloud-*) --force
# Discover openstackSDK version
SDK_VER=$(python -c "import openstack; print(openstack.version.__version__)")
pushd ci/
# run tests
ANSIBLE_COLLECTIONS_PATHS=${HOME}/.ansible/collections ansible-playbook -vvv ./run-collection.yml -e "cloud=${CLOUD} image=${IMAGE} ${ANSIBLE_VARS}" ${tag_opt}
ANSIBLE_COLLECTIONS_PATHS=${HOME}/.ansible/collections ansible-playbook \
-vvv ./run-collection.yml \
-e "sdk_version=${SDK_VER} cloud=${CLOUD} image=${IMAGE} ${ANSIBLE_VARS}" \
${tag_opt}
popd