forked from kubernetes-sigs/kubespray
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exercise multiple ansible versions in CI (kubernetes-sigs#8172)
* Ansible: separate requirements files for supported ansible versions * Ansible: allow using ansible 2.11 * CI: Exercise Ansible 2.9 and Ansible 2.11 in a basic AIO CI job * CI: Allow running a reset test outside of idempotency tests and running it in stage1 * CI: move ubuntu18-calico-aio job to stage2 and relay only on ubuntu20 with the variously supported ansible versions for stage1 * CI: add capability to install collections or roles from ansible-galaxy to mitigate missing behavior in older ansible versions
- Loading branch information
1 parent
7ae908e
commit 6007766
Showing
16 changed files
with
122 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ansible==3.4.0 | ||
ansible-base==2.10.15 | ||
cryptography==2.8 | ||
jinja2==2.11.3 | ||
netaddr==0.7.19 | ||
pbr==5.4.4 | ||
jmespath==0.9.5 | ||
ruamel.yaml==0.16.10 | ||
ruamel.yaml.clib==0.2.4 | ||
MarkupSafe==1.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ansible==4.8.0 | ||
ansible-core==2.11.6 | ||
cryptography==2.8 | ||
jinja2==2.11.3 | ||
netaddr==0.7.19 | ||
pbr==5.4.4 | ||
jmespath==0.9.5 | ||
ruamel.yaml==0.16.10 | ||
ruamel.yaml.clib==0.2.4 | ||
MarkupSafe==1.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ansible==2.9.27 | ||
jinja2==2.11.3 | ||
netaddr==0.7.19 | ||
pbr==5.4.4 | ||
jmespath==0.9.5 | ||
ruamel.yaml==0.16.10 | ||
ruamel.yaml.clib==0.2.4 | ||
MarkupSafe==1.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
collections: | ||
- name: community.general | ||
version: '<3.0' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
requirements-2.10.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
packet_ubuntu20-calico-aio.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
packet_ubuntu20-calico-aio.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-r ../requirements-2.10.txt | ||
yamllint==1.19.0 | ||
apache-libcloud==2.2.1 | ||
tox==3.11.1 | ||
dopy==0.3.7 | ||
cryptography==2.8 | ||
ansible-lint==5.0.11 | ||
openshift==0.8.8 | ||
molecule==3.0.6 | ||
molecule-vagrant==0.3 | ||
testinfra==5.2.2 | ||
python-vagrant==0.5.15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-r ../requirements-2.11.txt | ||
yamllint==1.19.0 | ||
apache-libcloud==2.2.1 | ||
tox==3.11.1 | ||
dopy==0.3.7 | ||
cryptography==2.8 | ||
ansible-lint==5.0.11 | ||
openshift==0.8.8 | ||
molecule==3.0.6 | ||
molecule-vagrant==0.3 | ||
testinfra==5.2.2 | ||
python-vagrant==0.5.15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-r ../requirements-2.9.txt | ||
yamllint==1.19.0 | ||
apache-libcloud==2.2.1 | ||
tox==3.11.1 | ||
dopy==0.3.7 | ||
cryptography==2.8 | ||
ansible-lint==5.0.11 | ||
openshift==0.8.8 | ||
molecule==3.0.6 | ||
molecule-vagrant==0.3 | ||
testinfra==5.2.2 | ||
python-vagrant==0.5.15 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
requirements-2.10.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
/usr/bin/python -m pip uninstall -y ansible | ||
/usr/bin/python -m pip install -r tests/requirements.txt | ||
: ${ANSIBLE_MAJOR_VERSION:=2.10} | ||
|
||
/usr/bin/python -m pip uninstall -y ansible ansible-base ansible-core | ||
/usr/bin/python -m pip install -r tests/requirements-${ANSIBLE_MAJOR_VERSION}.txt | ||
mkdir -p /.ssh | ||
mkdir -p cluster-dump | ||
mkdir -p $HOME/.ssh | ||
ansible-playbook --version | ||
|
||
# in some cases we may need to bring in collections or roles from ansible-galaxy | ||
# to compensate for missing functionality in older ansible versions | ||
if [ -f requirements-${ANSIBLE_MAJOR_VERSION}.yml ] ; then | ||
ansible-galaxy role install -r requirements-${ANSIBLE_MAJOR_VERSION}.yml | ||
ansible-galaxy collection install -r requirements-${ANSIBLE_MAJOR_VERSION}.yml | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters