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:
parent
a55f3fd1ca
commit
2753b5bc42
@ -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
|
||||
|
@ -12,7 +12,9 @@
|
||||
# - { role: image, tags: image }
|
||||
- { role: keypair, tags: keypair }
|
||||
- { role: keystone_domain, tags: keystone_domain }
|
||||
- { role: keystone_mapping, tags: keystone_mapping }
|
||||
- role: keystone_mapping
|
||||
tags: keystone_mapping
|
||||
when: sdk_version is version(0.44, '>=')
|
||||
- { role: keystone_role, tags: keystone_role }
|
||||
- { role: network, tags: network }
|
||||
- { role: nova_flavor, tags: nova_flavor }
|
||||
|
Loading…
x
Reference in New Issue
Block a user