Commit graph

6 commits

Author SHA1 Message Date
Chris Evich
9024bdbc28 integration: Fix chdir in wrapper script
Previously the wrapper changed to $WORKSPACE prior to executing
the ansible-playbook command.  This has the unintended consequence of
preventing use of relative paths.  Fix this by using absolute paths in
wrapper script instead of changing directories.

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-09-28 14:05:25 -04:00
Chris Evich
a30a118fe6 integration: Collect subject results
Add a playbook to pull down the integration and e2e testing
logs/xml.  By default they will appear in a 'artifacts' subdirectory
of wherever the ``results.yml`` playbook lives. If the ``$WORKSPACE``
env. var is set and non-empty, the subdirectory will be created
there instead.

Inside the ``artifacts`` directory, further sub-directories are created,
one for each subject's Ansible inventory name.  Within those
sub-directories are all the collected logs from that host.  In this way,
automation may simply archive the entire 'artifacts' directory to
capture the important log files.

(Depends on PR #935)

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-09-28 14:05:25 -04:00
Chris Evich
0e55fb2ea3 integration: Add color + readable logging
When run by hand, it's much easier to spot things going wrong when
they're colored in red.  Add an ansible.cfg to make that happen.  This
also sets a default output log file (``$ARTIFACTS/main.log``) - that
doesn't contain color-codes.

When executing against multple hosts, the output can sometimes become
difficult to read, esp. with lots of async. tasks.  The callback_plugin
script reorganizes how the console and log is organized, making it
clearer which host did what and when.

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-09-28 14:05:25 -04:00
Chris Evich
29c4d890c8 Faster venv-ansible-playbook.sh
If running a playbook more than once, there's no need to re-bootstrap
the virtual environment.  Assume if the verified crio directory already
exists, it should be used (after re-asserting hashes of requirements).

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-09-21 12:59:33 -04:00
Chris Evich
8689fe8aed Minor: Make wrapper script non-zero exits fatal.
Signed-off-by: Chris Evich <cevich@redhat.com>
2017-08-31 13:06:58 -04:00
Chris Evich
054793b80e Add Ansible playbook env. setup wrapper script
The environment executing the test playbooks matters.  Establish a
script to bootstrap a known-good and fixed-version python virtual
environment.  Spell out precise execution requirements in a standard
pip 'requirements.txt' file, including version numbers and hashes.

Upon executing the ``venv-ansible-playbook.sh`` wrapper, a virtual
environment is setup and contained within a fixed (or temporary)
directory, with full logs from setup.  If this is to be preserved
across executions, the ``$WORKSPACE`` environment variable must be
set and exported beforehand.

Example execution command-line provided in script file

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-08-31 06:10:48 -04:00