From 26ffe940707a1b575515ec8833c941db4f7c7d82 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 15:42:34 +0200 Subject: [PATCH] [PR #1076/29542816 backport][stable-3] CI: Use community.crypto 2.x.y for older ansible-core versions / Python versions (#1077) * Use community.crypto 2.x.y for older ansible-core versions / Python versions. (#1076) (cherry picked from commit 295428167b75308e9c8d5e6a2e2dd1cc075c5687) * This also applies for ansible-core 2.15. --------- Co-authored-by: Felix Fontein --- .github/workflows/ansible-test.yml | 3 ++- tests/utils/shippable/shippable.sh | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 435f0e2c..8c49d10b 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -210,12 +210,13 @@ 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 ; git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.posix.git ../../ansible/posix ; - git clone --depth=1 --single-branch https://github.com/ansible-collections/community.crypto.git ../../community/crypto + git clone --depth=1 --single-branch --branch stable-2 https://github.com/ansible-collections/community.crypto.git ../../community/crypto ; git clone --depth=1 --single-branch https://github.com/ansible-collections/community.general.git ../../community/general ; diff --git a/tests/utils/shippable/shippable.sh b/tests/utils/shippable/shippable.sh index 5777b4f6..86cb80f3 100755 --- a/tests/utils/shippable/shippable.sh +++ b/tests/utils/shippable/shippable.sh @@ -69,6 +69,11 @@ export ANSIBLE_COLLECTIONS_PATHS="${PWD}/../../../" # START: HACK +COMMUNITY_CRYPTO_BRANCH=main +if [ "${ansible_version}" == "2.16" ] || [ "${ansible_version}" == "2.15" ]; then + COMMUNITY_CRYPTO_BRANCH=stable-2 +fi + retry git clone --depth=1 --single-branch --branch stable-1 https://github.com/ansible-collections/community.library_inventory_filtering.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/library_inventory_filtering_v1" # 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.library_inventory_filtering_v1 @@ -84,7 +89,7 @@ fi if [ "${script}" != "sanity/1" ] && [ "${script}" != "units/1" ]; 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.general.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/general" # 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