--- /dev/null
+#!/bin/bash
+set -ex
+WORKDIR=$(mktemp -td tox.XXXXXXXXXX)
+
+# the following two methods exist in scripts/build_utils.sh
+pkgs=( "tox" )
+install_python_packages "pkgs[@]"
+
+
+delete_libvirt_vms
+clear_libvirt_networks
+restart_libvirt_services
+update_vagrant_boxes
+
+cd src/ceph-volume/ceph_volume/tests/functional/$SUBCOMMAND
+
+CEPH_DEV_BRANCH=$CEPH_BRANCH CEPH_DEV_SHA1=$CEPH_SHA1 CEPH_ANSIBLE_BRANCH=$CEPH_ANSIBLE_BRANCH $VENV/tox --workdir=$WORKDIR -vre $SCENARIO -- --provider=libvirt
--- /dev/null
+#!/bin/bash
+# There has to be a better way to do this than this script which just looks
+# for every Vagrantfile in scenarios and then just destroys whatever is left.
+
+
+cd $WORKSPACE/src/ceph-volume/ceph_volume/tests/functional
+
+scenarios=$(find . | grep Vagrantfile | xargs dirname)
+
+for scenario in $scenarios; do
+ cd $scenario
+ vagrant destroy -f
+ cd -
+done
+
+# Sometimes, networks may linger around, so we must ensure they are killed:
+networks=`sudo virsh net-list --all | grep active | egrep -v "(default|libvirt)" | cut -d ' ' -f 2`
+for network in $networks; do
+ sudo virsh net-destroy $network || true
+ sudo virsh net-undefine $network || true
+done
+
--- /dev/null
+
+- job:
+ name: 'ceph-volume-scenario'
+ node: vagrant&&libvirt
+ concurrent: true
+ defaults: global
+ display-name: 'ceph-volume: individual scenario testing'
+ quiet-period: 5
+ block-downstream: false
+ block-upstream: false
+ retry-count: 3
+ properties:
+ - github:
+ url: https://github.com/ceph/ceph
+ logrotate:
+ daysToKeep: 15
+ numToKeep: 30
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+
+ parameters:
+ - string:
+ name: SUBCOMMAND
+ description: "The subcommand in ceph-volume we are testing. (lvm or simple)"
+ default: "lvm"
+ - string:
+ name: SCENARIO
+ description: "A full scenario name for ceph-volume testing, like xenial-bluestore-create"
+ - string:
+ name: CEPH_BRANCH
+ description: "The ceph branch to test against"
+ default: "master"
+ - string:
+ name: CEPH_SHA1
+ description: "The ceph sha1 to test against"
+ default: "latest"
+ - string:
+ name: CEPH_ANSIBLE_BRANCH
+ description: "The ceph-ansible branch to test against"
+ default: "master"
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph.git
+ branches:
+ - $CEPH_BRANCH
+ refspec: +refs/pull/*:refs/remotes/origin/pr/*
+ browser: auto
+ timeout: 20
+ skip-tag: true
+ wipe-workspace: true
+
+ builders:
+ - shell:
+ !include-raw:
+ - ../../../scripts/build_utils.sh
+ - ../../build/build
+
+ publishers:
+ - postbuildscript:
+ script-only-if-succeeded: False
+ script-only-if-failed: True
+ builders:
+ - shell: !include-raw ../../build/teardown