From: Markos Chandras Date: Thu, 16 Feb 2017 17:21:04 +0000 (+0000) Subject: prototypes: bifrost: Collect logs even if deployment fails X-Git-Tag: danube.1.0~258^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=62ca1cf05a8930be33583aebb18716ce93f1a9f8;p=releng.git prototypes: bifrost: Collect logs even if deployment fails Move the collect-test-info.sh script to the 'exit' trap so we can collect whatever logs we can even if the bifrost deployment failed. Upstream change: https://review.openstack.org/433532 Change-Id: Icfbec01d894ff33e83730a40a09dc5540008dbaa Signed-off-by: Markos Chandras --- diff --git a/prototypes/bifrost/scripts/test-bifrost-deployment.sh b/prototypes/bifrost/scripts/test-bifrost-deployment.sh index 914a906f4..3e2381fea 100755 --- a/prototypes/bifrost/scripts/test-bifrost-deployment.sh +++ b/prototypes/bifrost/scripts/test-bifrost-deployment.sh @@ -79,6 +79,11 @@ source ${ANSIBLE_INSTALL_ROOT}/ansible/hacking/env-setup ANSIBLE=$(which ansible-playbook) set -x -o nounset +logs_on_exit() { + $SCRIPT_HOME/collect-test-info.sh +} +trap logs_on_exit EXIT + # Change working directory cd $BIFROST_HOME/playbooks @@ -129,6 +134,4 @@ if [ $EXITCODE != 0 ]; then echo "****************************" fi -$SCRIPT_HOME/collect-test-info.sh - exit $EXITCODE