Always halt vagrant instances when on CI server.

We were having issues with lots of stale VMs being left around. This, hopefully, fixes it.

Fixes #9642
This commit is contained in:
Andrew Cholakian 2018-05-22 16:17:26 -05:00
parent 7869bd7894
commit 3509199e87

View file

@ -21,6 +21,12 @@ SELECTED_TEST_SUITE=$1
# BUILD_ID unless you set this magic flag: https://wiki.jenkins.io/display/JENKINS/ProcessTreeKiller
export BUILD_ID=dontKillMe
# Always run the halt, even if the test times out or an exit is sent
cleanup() {
bundle exec rake qa:vm:halt
}
trap cleanup EXIT
if [[ $SELECTED_TEST_SUITE == $"redhat" ]]; then
echo "Generating the RPM, make sure you start with a clean environment before generating other packages."
rake artifact:rpm
@ -60,3 +66,5 @@ elif [[ $SELECTED_TEST_SUITE == $"all" ]]; then
bundle exec rake qa:vm:halt
cd ..
fi