Fix collection dependency installation in CI. (#239)

This commit is contained in:
Felix Fontein 2021-11-18 21:14:54 +01:00 committed by GitHub
parent 31fae211fe
commit abd057f447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@ if [ "${test}" == "sanity/extra" ]; then
fi
# START: HACK
if [ "${script}" != "sanity" ] || [ "${test}" == "sanity/extra" ]; then
if [ "${test}" == "sanity/extra" ]; then
# Nothing further should be added to this list.
# This is to prevent modules or plugins in this collection having a runtime dependency on other collections.
retry git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/internal_test_tools"
@ -86,7 +86,7 @@ if [ "${script}" != "sanity" ] || [ "${test}" == "sanity/extra" ]; then
# retry ansible-galaxy -vvv collection install community.internal_test_tools
fi
if [ "${script}" != "sanity" ] && [ "${script}" != "units" ]; then
if [ "${script}" != "sanity" ] && [ "${script}" != "units" ] && [ "${test}" != "sanity/extra" ]; then
# To prevent Python dependencies on other collections only install other collections for integration tests
retry git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.posix.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/ansible/posix"
retry git clone --depth=1 --single-branch https://github.com/ansible-collections/community.crypto.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/crypto"