1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[stable-1] Install collections in CI directly with git (#2087)

* Install collections in CI directly with git to work around the Galaxy CloudFlare PITA. (#2082)

(cherry picked from commit 7fe9dd7a60)

* Repace more ansible-galaxy collection install calls.

* Restrict community.kubernetes dependency.
This commit is contained in:
Felix Fontein 2021-03-23 08:04:19 +01:00 committed by GitHub
parent 85cd2132fc
commit dba8e02c7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 7 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- "Restrict dependency to community.kubernetes to < 2.0.0, since community.general will no longer work with the latest git version of community.kubernetes (https://github.com/ansible-collections/community.general/pull/2087)."

View file

@ -10,7 +10,7 @@ tags: [community]
# NOTE: No more dependencies can be added to this list # NOTE: No more dependencies can be added to this list
dependencies: dependencies:
ansible.netcommon: '>=1.0.0' ansible.netcommon: '>=1.0.0'
community.kubernetes: '>=1.0.0' community.kubernetes: '>=1.0.0,<2.0.0'
google.cloud: '>=1.0.0' google.cloud: '>=1.0.0'
repository: https://github.com/ansible-collections/community.general repository: https://github.com/ansible-collections/community.general
documentation: https://docs.ansible.com/ansible/latest/collections/community/general/ documentation: https://docs.ansible.com/ansible/latest/collections/community/general/

View file

@ -74,20 +74,29 @@ else
fi fi
# START: HACK install dependencies # START: HACK install dependencies
retry ansible-galaxy -vvv collection install ansible.netcommon retry git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.netcommon.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/ansible/netcommon"
retry ansible-galaxy -vvv collection install community.kubernetes retry git clone --depth=1 --single-branch https://github.com/ansible-collections/community.kubernetes.git --branch 1.2.0 "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/kubernetes"
retry ansible-galaxy -vvv collection install google.cloud retry git clone --depth=1 --single-branch https://github.com/ansible-collections/google.cloud.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/google/cloud"
# NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429)
# retry ansible-galaxy -vvv collection install ansible.netcommon
# retry ansible-galaxy -vvv collection install community.kubernetes
# retry ansible-galaxy -vvv collection install google.cloud
if [ "${script}" != "sanity" ] || [ "${test}" == "sanity/extra" ]; then if [ "${script}" != "sanity" ] || [ "${test}" == "sanity/extra" ]; then
# Nothing further should be added to this list. # 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. # This is to prevent modules or plugins in this collection having a runtime dependency on other collections.
retry ansible-galaxy -vvv collection install community.internal_test_tools 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"
# NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429)
# retry ansible-galaxy -vvv collection install community.internal_test_tools
fi fi
if [ "${script}" != "sanity" ] && [ "${script}" != "units" ]; then if [ "${script}" != "sanity" ] && [ "${script}" != "units" ]; then
# To prevent Python dependencies on other collections only install other collections for integration tests # To prevent Python dependencies on other collections only install other collections for integration tests
retry ansible-galaxy -vvv collection install ansible.posix retry git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.posix.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/ansible/posix"
retry ansible-galaxy -vvv collection install community.crypto retry git clone --depth=1 --single-branch https://github.com/ansible-collections/community.crypto.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/crypto"
# NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429)
# retry ansible-galaxy -vvv collection install ansible.posix
# retry ansible-galaxy -vvv collection install community.crypto
fi fi
# END: HACK # END: HACK