Setup ARA reporting for central tests repository
Following on from https://review.openstack.org/#/c/396324/ Let's set this up for the central test repo (which will filter down for other role tests). Change-Id: Ie592aa161890e7b3ef7e586726ce301e24964dd9
This commit is contained in:
parent
4940cf1b24
commit
55d324e4b1
@ -12,3 +12,6 @@ ansible==2.2.0
|
||||
|
||||
# The Ansible lint version used for lint tests
|
||||
ansible-lint==3.4.1
|
||||
|
||||
# ARA for reporting
|
||||
ara
|
||||
|
@ -95,6 +95,15 @@ else
|
||||
echo "Skipping the role link because no role name was provided."
|
||||
fi
|
||||
|
||||
# Link the ARA Callback directory to the the ansible callback directory
|
||||
if [ -d "${WORKING_DIR}/.tox/functional/lib/python2.7/site-packages/ara/callback/" ]; then
|
||||
if [ ! -L "${ANSIBLE_PLUGIN_DIR}/callback/ara" ]; then
|
||||
echo "Linking ${ANSIBLE_PLUGIN_DIR}/callback/ara to ${WORKING_DIR}/.tox/functional/lib/python2.7/site-packages/ara/callback/"
|
||||
mkdir -p "${ANSIBLE_PLUGIN_DIR}/callback/ara"
|
||||
ln -s "${WORKING_DIR}/.tox/functional/lib/python2.7/site-packages/ara/callback/" "${ANSIBLE_PLUGIN_DIR}/callback/ara/"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Ensure that the Ansible configuration file is in the right place
|
||||
if [ ! -f "${ANSIBLE_CFG_PATH}" ]; then
|
||||
if [ -f "${COMMON_TESTS_PATH}/test-ansible.cfg" ]; then
|
||||
|
@ -27,6 +27,8 @@
|
||||
|
||||
export WORKING_DIR=${WORKING_DIR:-$(pwd)}
|
||||
export RSYNC_CMD="rsync --archive --verbose --safe-links --ignore-errors"
|
||||
export ARA_CMD="${WORKING_DIR}/.tox/functional/bin/ara generate"
|
||||
export TESTING_HOME=${TESTING_HOME:-$HOME}
|
||||
|
||||
## Main ----------------------------------------------------------------------
|
||||
|
||||
@ -43,7 +45,11 @@ if [[ -d "/etc/nodepool" ]]; then
|
||||
# Rename all files gathered to have a .txt suffix so that the compressed
|
||||
# files are viewable via a web browser in OpenStack-CI.
|
||||
find "${WORKING_DIR}/logs/" -type f ! -name '*.html' -exec mv {} {}.txt \;
|
||||
# Get the ara sqlite database
|
||||
${RSYNC_CMD} "${TESTING_HOME}/.ara/ansible.sqlite" "${WORKING_DIR}/logs/" || true
|
||||
# Compress the files gathered so that they do not take up too much space.
|
||||
# We use 'command' to ensure that we're not executing with some sort of alias.
|
||||
command gzip --best --recursive "${WORKING_DIR}/logs/"
|
||||
# Generate the ARA report
|
||||
${ARA_CMD} "${WORKING_DIR}/logs/ara" || true
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user