From 12415f3e2fb0f1753e8d08c18f9adc21729916f8 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 09:18:01 +0200 Subject: [PATCH] [PR #10086/60f1169d backport][stable-10] CI: Use community.crypto 2.x.y for ansible-core 2.16 and before (#10089) CI: Use community.crypto 2.x.y for ansible-core 2.16 and before (#10086) * Use community.crypto 2.x.y for ansible-core 2.16 and before. * Also use stable-2 for ubuntu2004 tests. (cherry picked from commit 60f1169d4242a03f98e0cbeab82c0d9969af5851) Co-authored-by: Felix Fontein --- .github/workflows/ansible-test.yml | 1 + tests/utils/shippable/shippable.sh | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 7842888903..81e082b366 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -166,6 +166,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