delete_libvirt_vms
clear_libvirt_networks
restart_libvirt_services
+update_vagrant_boxes
# the $SCENARIO var is injected by the job template. It maps
# to an actual, defined, tox environment
delete_libvirt_vms
clear_libvirt_networks
restart_libvirt_services
+update_vagrant_boxes
# This was initially in teardown but sometimes, it happens that the Jenkins Slave process
# crashes before teardown is executed, it means we keep leftofver from previous build.
delete_libvirt_vms
clear_libvirt_networks
restart_libvirt_services
+update_vagrant_boxes
# the $SCENARIO var is injected by the job configuration. It maps
# to an actual, defined, tox environment
delete_libvirt_vms
clear_libvirt_networks
restart_libvirt_services
+update_vagrant_boxes
# adding groups on the fly doesn't guarantee their availability
# so we must use `sg` to execute the tests as part of the docker group to avoid
delete_libvirt_vms
clear_libvirt_networks
restart_libvirt_services
+update_vagrant_boxes
# adding groups on the fly doesn't guarantee their availability
# so we must use `sg` to execute the tests as part of the docker group to avoid
sudo service libvirt-bin restart
sudo service libvirt-guests restart
}
+
+# Function to update vagrant boxes on static libvirt slaves used for ceph-ansible and ceph-docker testing
+update_vagrant_boxes() {
+ outdated_boxes=`vagrant box outdated --global | grep 'is outdated' | awk '{ print $2 }' | | tr -d "'"`
+ if [ -n "$outdated_boxes" ]; then
+ for box in $outdated_boxes; do
+ vagrant box update --box $box
+ done
+ # Clean up old images
+ vagrant box prune
+ fi
+}