Skip to content

Commit 38a8994

Browse files
committed
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 60f1169)
1 parent 938ffa8 commit 38a8994

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/ansible-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ jobs:
212212
integration-continue-on-error: 'false'
213213
integration-diff: 'false'
214214
integration-retry-on-error: 'true'
215+
# TODO: remove "--branch stable-2" from community.crypto install once we're only using ansible-core 2.17 or newer!
215216
pre-test-cmd: >-
216217
mkdir -p ../../ansible
217218
;

tests/utils/shippable/shippable.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ IFS='/:' read -ra args <<< "$1"
1010

1111
ansible_version="${args[0]}"
1212
script="${args[1]}"
13+
after_script="${args[2]}"
1314

1415
function join {
1516
local IFS="$1";
@@ -81,10 +82,18 @@ if [ "${script}" != "sanity" ] || [ "${test}" == "sanity/extra" ]; then
8182
# retry ansible-galaxy -vvv collection install community.internal_test_tools
8283
fi
8384

85+
COMMUNITY_CRYPTO_BRANCH=main
86+
if [ "${ansible_version}" == "2.16" ]; then
87+
COMMUNITY_CRYPTO_BRANCH=stable-2
88+
fi
89+
if [ "${script}" == "linux" ] && [ "$after_script" == "ubuntu2004" ]; then
90+
COMMUNITY_CRYPTO_BRANCH=stable-2
91+
fi
92+
8493
if [ "${script}" != "sanity" ] && [ "${script}" != "units" ] && [ "${test}" != "sanity/extra" ]; then
8594
# To prevent Python dependencies on other collections only install other collections for integration tests
8695
retry git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.posix.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/ansible/posix"
87-
retry git clone --depth=1 --single-branch https://github.com/ansible-collections/community.crypto.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/crypto"
96+
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"
8897
# NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429)
8998
# retry ansible-galaxy -vvv collection install ansible.posix
9099
# retry ansible-galaxy -vvv collection install community.crypto

0 commit comments

Comments
 (0)