diff options
author | Fatih Degirmenci <fdegir@gmail.com> | 2018-03-22 20:22:58 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-03-22 20:22:58 +0000 |
commit | 9963c3564ed611de7c9f4db6d2f5a1ace1c1ef61 (patch) | |
tree | 220b67278b07000c3901ddd6a23a90bd130edf9b /xci/xci-deploy.sh | |
parent | 8a5d1ef8530b3148a9f218ef36782d1f3b0fba38 (diff) | |
parent | 613d9d5631fa4f7fbc6b565e35620fdb5dd3561e (diff) |
Merge "xci: Install the ARA callback plugin"
Diffstat (limited to 'xci/xci-deploy.sh')
-rwxr-xr-x | xci/xci-deploy.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh index 19ae7c0e..fa9f3351 100755 --- a/xci/xci-deploy.sh +++ b/xci/xci-deploy.sh @@ -25,10 +25,15 @@ submit_bug_report() { echo "xci installer: $INSTALLER_TYPE" echo "xci scenario: $DEPLOY_SCENARIO" echo "Environment variables:" - env | grep --color=never '\(OPNFV\|XCI\|INSTALLER_TYPE\|OPENSTACK\|SCENARIO\)' + env | grep --color=never '\(OPNFV\|XCI\|INSTALLER_TYPE\|OPENSTACK\|SCENARIO\|ANSIBLE\)' echo "-------------------------------------------------------------------------" } +exit_trap() { + submit_bug_report + collect_xci_logs +} + #------------------------------------------------------------------------------- # This script should not be run as root #------------------------------------------------------------------------------- @@ -86,7 +91,7 @@ done unset user_local_dev_vars local_user_var # register our handler -trap submit_bug_report ERR +trap exit_trap ERR # We are using sudo so we need to make sure that env_reset is not present sudo sed -i "s/^Defaults.*env_reset/#&/" /etc/sudoers @@ -151,10 +156,15 @@ echo "Info: Deploying '${INSTALLER_TYPE}' installer" echo "-----------------------------------------------------------------------" source ${XCI_PATH}/xci/installer/${INSTALLER_TYPE}/deploy.sh +# Reset trap +trap ERR + # Deployment time xci_deploy_time=$SECONDS echo "-------------------------------------------------------------------------------------------------------------" echo "Info: xci_deploy.sh deployment took $(($xci_deploy_time / 60)) minutes and $(($xci_deploy_time % 60)) seconds" echo "-------------------------------------------------------------------------------------------------------------" +collect_xci_logs + # vim: set ts=4 sw=4 expandtab: |