Correct bug report save location

Moves bug report save location to the playbook directory
on the machine running ansible, I feel that this is an odd
place to put anything but it seems to be intended behavior.

This commit changes where the bug report is saved and where
the CI script checks for the output file, until a consistent
version of this is checked in CI will fail often.

Change-Id: I94d221d718fb13779bf056ae83376851f82a355b
This commit is contained in:
jkilpatr 2016-09-09 07:46:46 -04:00
parent 4832550256
commit b768d626df
3 changed files with 12 additions and 10 deletions

View File

@ -1,4 +1,4 @@
---
result_dir: "{{inventory_dir}}/../results"
result_dir: "{{ playbook_dir }}/../../results"
mysql_tuner_script: https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl

View File

@ -57,9 +57,10 @@
ansible_python_interpreter: "/usr/bin/python"
name: Generating bug report
tasks:
- local_action: template src=templates/bug_report.j2 dest={{result_dir}}/bug_report.log
- file: "path={{result_dir}} state=directory"
- template: src=templates/bug_report.j2 dest={{result_dir}}/bug_report.log
become: false
- local_action: template src=templates/mysql_report.j2 dest={{result_dir}}/mysql_report.log
- template: src=templates/mysql_report.j2 dest={{result_dir}}/mysql_report.log
become: false
- replace: dest={{result_dir}}/mysql_report.log regexp='\[([^\s+]+)' replace=''
- replace: dest={{result_dir}}/mysql_report.log regexp='\r' replace=''

View File

@ -44,11 +44,11 @@ deployCloud()
pushd $WORKSPACE/tripleo-quickstart
bash quickstart.sh \
--tags all \
-e undercloud_image_url="http://artifacts.ci.centos.org/artifacts/rdo/images/$RELEASE/$BUILD_SYS/$LOCATION/undercloud.qcow2" \
--config $WORKSPACE/config/general_config/$CONFIG.yml \
--working-dir $WORKSPACE/ \
--teardown all \
--no-clone \
--playbook quickstart-extras.yml \
--requirements quickstart-extras-requirements.txt \
-R mitaka \
--bootstrap \
--working-dir $WORKSPACE \
$VIRTHOST $RELEASE
popd
}
@ -100,12 +100,13 @@ runCheck()
ansible-playbook --ssh-common-args="-F $WORKSPACE/ssh.config.ansible" -i $WORKSPACE/hosts check/site.yml
if [[ $($SSH_CMD "cat /home/stack/ansible/bug_report.log") == "" ]]
pushd $WORKSPACE/browbeat/results
if [[ $(cat bug_report.log) == "" ]]
then
#checks failed to create the bug_report.log
exit 1
fi
popd
popd
}