mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-19 19:32:05 +02:00
Among other things, build now is not based on the upstream version of onos-setup-p4-dev, but on the local one. Change-Id: I270a324152a9349d6a9989aa8b5a38b45e1856d9
31 lines
694 B
Bash
Executable File
31 lines
694 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -xe
|
|
|
|
# Remove references to the existing vagrant-built VM (if any).
|
|
# We want to build a new one from scratch, not start an existing one.
|
|
rm -rf .vagrant/
|
|
|
|
vagrant up
|
|
|
|
SSH_PORT=`vagrant port --guest 22`
|
|
VB_UUID=`cat .vagrant/machines/default/virtualbox/id`
|
|
|
|
sshpass -p 'rocks' \
|
|
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
|
|
-p ${SSH_PORT} sdn@127.0.0.1 "bash /vagrant/pre-ova-cleanup.sh"
|
|
|
|
# Wait for VM to power off
|
|
sleep 10
|
|
|
|
# Make sure VM is not running
|
|
vagrant halt
|
|
|
|
sleep 5
|
|
|
|
# Remove vagrant shared folder
|
|
vboxmanage sharedfolder remove ${VB_UUID} -name "vagrant"
|
|
|
|
rm -rf onos-p4-dev.ova
|
|
vboxmanage export ${VB_UUID} -o onos-p4-dev.ova
|