summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2017-11-07 15:23:39 -0800
committerGuo Ruijing <ruijing.guo@intel.com>2017-11-07 15:30:06 -0800
commit5f41686bc6a09307e346bbbf980ab45df7ac9ced (patch)
tree5da36c7cdc8651b447814a7b21f002bd9426cd50 /ci
parent870286745312e2794712ee40c6afc9056929f803 (diff)
add cleanup for container4nfv
1. move interface cleanup to cleanup.sh 2. can destroy vms after jenkins abort Change-Id: I627070ace6fa5cded507964091c40784ce4a19f9 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Diffstat (limited to 'ci')
-rwxr-xr-xci/cleanup.sh23
-rwxr-xr-xci/deploy.sh1
2 files changed, 24 insertions, 0 deletions
diff --git a/ci/cleanup.sh b/ci/cleanup.sh
new file mode 100755
index 0000000..ee5c428
--- /dev/null
+++ b/ci/cleanup.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+# Copyright (c) 2017 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -x
+
+VBoxManage list vms | cut -f2 -d'"' | xargs -I {} VBoxManage unregistervm {} --delete
+VBoxManage list vms | cut -f2 -d'"' | xargs -I {} VBoxManage controlvm {} poweroff
+VBoxManage list hostonlyifs | grep "^Name:.*vboxnet" |\
+ sed "s/^Name:.*vboxnet/vboxnet/" | xargs -I {} VBoxManage hostonlyif remove {}
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 0384948..2b335e4 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -17,6 +17,7 @@
set -ex
+./cleanup.sh
../src/vagrant/kubeadm_ovsdpdk/deploy.sh
../src/vagrant/kubeadm_multus/deploy.sh
../src/vagrant/kubeadm_virtlet/deploy.sh