mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
Test the correct version when testing collection + upgrade (#12675)
If we don't rebuild the collection and remove the previous archive we'll test the first built.
This commit is contained in:
@@ -24,17 +24,13 @@ fi
|
|||||||
export ANSIBLE_BECOME=true
|
export ANSIBLE_BECOME=true
|
||||||
export ANSIBLE_BECOME_USER=root
|
export ANSIBLE_BECOME_USER=root
|
||||||
|
|
||||||
# Test collection build and install by installing our collection, emptying our repository, adding
|
|
||||||
# cluster.yml, reset.yml, and remote-node.yml files that simply point to our collection's playbooks, and then
|
|
||||||
# running the same tests as before
|
|
||||||
if [[ "${TESTCASE}" =~ "collection" ]]; then
|
|
||||||
# Build and install collection
|
|
||||||
ansible-galaxy collection build
|
|
||||||
ansible-galaxy collection install kubernetes_sigs-kubespray-*.tar.gz
|
|
||||||
fi
|
|
||||||
run_playbook () {
|
run_playbook () {
|
||||||
if [[ "${TESTCASE}" =~ "collection" ]]; then
|
if [[ "${TESTCASE}" =~ "collection" ]]; then
|
||||||
playbook=kubernetes_sigs.kubespray.$1
|
playbook=kubernetes_sigs.kubespray.$1
|
||||||
|
# Handle upgrade case properly
|
||||||
|
rm -f kubernetes_sigs-kubespray-*.tar.gz
|
||||||
|
ansible-galaxy collection build
|
||||||
|
ansible-galaxy collection install kubernetes_sigs-kubespray-*.tar.gz
|
||||||
else
|
else
|
||||||
playbook=$1.yml
|
playbook=$1.yml
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user