Skip to content
Snippets Groups Projects
Commit 6e39009e authored by MJB's avatar MJB
Browse files

deleting VMs using vboxmanage rather than vagrant destroy

parent 69722316
No related branches found
No related tags found
No related merge requests found
......@@ -24,14 +24,10 @@ test:all:
- vagrant --fixture=monitoring -- ssh test-runner -- -tt "pytest -s --pyargs clmctest.monitoring"
- vagrant --fixture=inputs -- up
- vagrant --fixture=inputs -- ssh test-runner -- -tt "pytest -s --pyargs clmctest.inputs"
when: on_success
when: manual
clean:
stage: clean
script:
- echo "Clean VMs"
after_script:
- vagrant --fixture=inputs -- destroy --force
- vagrant --fixture=monitoring -- destroy --force
- vagrant --fixture=scripts -- destroy --force
- scripts/build/deleteallvms.sh"
when: always
\ No newline at end of file
#!/bin/bash
vboxmanage list vms | awk ' {print $1} ' | awk -F',' '{gsub(/"/, "", $1); print $1}' > runningvms
while read vm_id; do
echo $vm_id
vboxmanage controlvm $vm_id poweroff
vboxmanage unregistervm $vm_id --delete
done <runningvms
rm runningvms
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment