diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index efdf61c704..3ee0689241 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -214,6 +214,7 @@ jobs: integration-continue-on-error: 'false' integration-diff: 'false' integration-retry-on-error: 'true' + # TODO: remove "--branch stable-2" from community.crypto install once we're only using ansible-core 2.17 or newer! pre-test-cmd: >- mkdir -p ../../ansible ; diff --git a/tests/utils/shippable/shippable.sh b/tests/utils/shippable/shippable.sh index 4167d7ffc5..19337cb2f0 100755 --- a/tests/utils/shippable/shippable.sh +++ b/tests/utils/shippable/shippable.sh @@ -10,6 +10,7 @@ IFS='/:' read -ra args <<< "$1" ansible_version="${args[0]}" script="${args[1]}" +after_script="${args[2]}" function join { local IFS="$1"; @@ -69,6 +70,14 @@ export ANSIBLE_COLLECTIONS_PATHS="${PWD}/../../../" # START: HACK install dependencies +COMMUNITY_CRYPTO_BRANCH=main +if [ "${ansible_version}" == "2.16" ]; then + COMMUNITY_CRYPTO_BRANCH=stable-2 +fi +if [ "${script}" == "linux" ] && [ "$after_script" == "ubuntu2004" ]; then + COMMUNITY_CRYPTO_BRANCH=stable-2 +fi + # 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" @@ -78,7 +87,7 @@ retry git clone --depth=1 --single-branch https://github.com/ansible-collections if [ "${script}" != "sanity" ] && [ "${script}" != "units" ]; 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" + retry git clone --depth=1 --single-branch --branch "${COMMUNITY_CRYPTO_BRANCH}" https://github.com/ansible-collections/community.crypto.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/crypto" retry git clone --depth=1 --single-branch https://github.com/ansible-collections/community.docker.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/docker" # 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