summaryrefslogtreecommitdiffstats
path: root/bifrost
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-02-16 17:21:04 +0000
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2017-08-11 12:56:12 -0700
commitf37b1727593632eae93a6347ccf628325e430d01 (patch)
treebdef6d9d69b0c9eda092939fc63a0660917fffd7 /bifrost
parent11191a625d99944cc9c514e9fc97ff3f39665a60 (diff)
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 <mchandras@suse.de>
Diffstat (limited to 'bifrost')
-rwxr-xr-xbifrost/scripts/test-bifrost-deployment.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/bifrost/scripts/test-bifrost-deployment.sh b/bifrost/scripts/test-bifrost-deployment.sh
index 914a906f..3e2381fe 100755
--- a/bifrost/scripts/test-bifrost-deployment.sh
+++ b/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