From a090038d027e2c9704b4461a50670a615779659e Mon Sep 17 00:00:00 2001 From: Cristian Calin <6627509+cristicalin@users.noreply.github.com> Date: Wed, 23 Feb 2022 17:36:19 +0200 Subject: [PATCH] [CI] add ara to collect CI job logs (#8545) --- ansible.cfg | 2 +- tests/requirements-2.10.txt | 1 + tests/requirements-2.11.txt | 1 + tests/requirements-2.9.txt | 1 + tests/scripts/testcases_cleanup.sh | 5 +++++ tests/scripts/testcases_run.sh | 3 +++ 6 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ansible.cfg b/ansible.cfg index c17fe48fd..79c2bc56c 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -14,7 +14,7 @@ fact_caching_timeout = 7200 stdout_callback = default display_skipped_hosts = no library = ./library -callback_whitelist = profile_tasks +callback_whitelist = profile_tasks,ara_default roles_path = roles:$VIRTUAL_ENV/usr/local/share/kubespray/roles:$VIRTUAL_ENV/usr/local/share/ansible/roles:/usr/share/kubespray/roles deprecation_warnings=False inventory_ignore_extensions = ~, .orig, .bak, .ini, .cfg, .retry, .pyc, .pyo, .creds, .gpg diff --git a/tests/requirements-2.10.txt b/tests/requirements-2.10.txt index a80c3a868..e139e1fa6 100644 --- a/tests/requirements-2.10.txt +++ b/tests/requirements-2.10.txt @@ -10,3 +10,4 @@ molecule==3.0.6 molecule-vagrant==0.3 testinfra==5.2.2 python-vagrant==0.5.15 +ara[server]==1.5.7 diff --git a/tests/requirements-2.11.txt b/tests/requirements-2.11.txt index 8ad98b8b4..b58e0f2c1 100644 --- a/tests/requirements-2.11.txt +++ b/tests/requirements-2.11.txt @@ -10,3 +10,4 @@ molecule==3.0.6 molecule-vagrant==0.3 testinfra==5.2.2 python-vagrant==0.5.15 +ara[server]==1.5.7 diff --git a/tests/requirements-2.9.txt b/tests/requirements-2.9.txt index 1feb6150c..9ae13b5b2 100644 --- a/tests/requirements-2.9.txt +++ b/tests/requirements-2.9.txt @@ -13,3 +13,4 @@ molecule-vagrant==0.3 testinfra==5.2.2 ; python_version >= '3.0' testinfra==3.4.0 ; python_version < '3.0' python-vagrant==0.5.15 +ara[server]==1.5.7 diff --git a/tests/scripts/testcases_cleanup.sh b/tests/scripts/testcases_cleanup.sh index 0e1d0f27f..71b7fdc5b 100755 --- a/tests/scripts/testcases_cleanup.sh +++ b/tests/scripts/testcases_cleanup.sh @@ -2,3 +2,8 @@ set -euxo pipefail cd tests && make delete-${CI_PLATFORM} -s ; cd - + +if [ -d ~/.ara ] ; then + tar czvf ${CI_PROJECT_DIR}/cluster-dump/ara.tgz ~/.ara + rm -fr ~/.ara +fi diff --git a/tests/scripts/testcases_run.sh b/tests/scripts/testcases_run.sh index 2e02103a2..ed16b24d0 100755 --- a/tests/scripts/testcases_run.sh +++ b/tests/scripts/testcases_run.sh @@ -16,10 +16,13 @@ else fi fi +# needed for ara not to complain +export TZ=UTC export ANSIBLE_REMOTE_USER=$SSH_USER export ANSIBLE_BECOME=true export ANSIBLE_BECOME_USER=root +export ANSIBLE_CALLBACK_PLUGINS="$(python -m ara.setup.callback_plugins)" cd tests && make create-${CI_PLATFORM} -s ; cd - ansible-playbook tests/cloud_playbooks/wait-for-ssh.yml