From b768d626dff9c63188fa49f068d1c14f9fddb7f5 Mon Sep 17 00:00:00 2001 From: jkilpatr Date: Fri, 9 Sep 2016 07:46:46 -0400 Subject: [PATCH] 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 --- ansible/check/group_vars/all.yml | 2 +- ansible/check/site.yml | 5 +++-- ci-scripts/tripleo/install-and-check.sh | 15 ++++++++------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ansible/check/group_vars/all.yml b/ansible/check/group_vars/all.yml index 9548241e6..857301ff7 100644 --- a/ansible/check/group_vars/all.yml +++ b/ansible/check/group_vars/all.yml @@ -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 diff --git a/ansible/check/site.yml b/ansible/check/site.yml index bc6acac1b..887d137d1 100644 --- a/ansible/check/site.yml +++ b/ansible/check/site.yml @@ -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='' diff --git a/ci-scripts/tripleo/install-and-check.sh b/ci-scripts/tripleo/install-and-check.sh index 4e56be298..c9766e3ad 100755 --- a/ci-scripts/tripleo/install-and-check.sh +++ b/ci-scripts/tripleo/install-and-check.sh @@ -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 }