]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
adds nightly functional testing for ceph-volume 951/head
authorAndrew Schoen <aschoen@redhat.com>
Fri, 9 Feb 2018 16:38:52 +0000 (10:38 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Fri, 9 Feb 2018 16:45:10 +0000 (10:45 -0600)
This will run all our PR tests against the luminous and
master branch of ceph nightly.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ceph-volume-nightly/build/build [new file with mode: 0644]
ceph-volume-nightly/build/teardown [new file with mode: 0644]
ceph-volume-nightly/config/definitions/ceph-volume-nightly.yml [new file with mode: 0644]

diff --git a/ceph-volume-nightly/build/build b/ceph-volume-nightly/build/build
new file mode 100644 (file)
index 0000000..a93f735
--- /dev/null
@@ -0,0 +1,17 @@
+#!/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 $VENV/tox --workdir=$WORKDIR -vre $DISTRO-$OBJECTSTORE-$SCENARIO -- --provider=libvirt
diff --git a/ceph-volume-nightly/build/teardown b/ceph-volume-nightly/build/teardown
new file mode 100644 (file)
index 0000000..9650719
--- /dev/null
@@ -0,0 +1,22 @@
+#!/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
+
diff --git a/ceph-volume-nightly/config/definitions/ceph-volume-nightly.yml b/ceph-volume-nightly/config/definitions/ceph-volume-nightly.yml
new file mode 100644 (file)
index 0000000..7e91bc5
--- /dev/null
@@ -0,0 +1,99 @@
+- project:
+    name: ceph-volume-nightly-lvm
+    distro:
+      - xenial
+      - centos7
+    objectstore:
+      - bluestore
+      - filestore
+    scenario:
+      - create
+      - dmcrypt
+    subcommand:
+      - lvm
+    ceph_branch:
+      - master
+      - luminous
+
+    jobs:
+      - 'ceph-volume-nightly-{ceph_branch}-{subcommand}-{distro}-{objectstore}-{scenario}'
+
+- project:
+    name: ceph-volume-nightly-simple
+    distro:
+      - xenial
+      - centos7
+    objectstore:
+      - bluestore
+      - filestore
+    scenario:
+      - activate
+      - dmcrypt_luks
+      - dmcrypt_plain
+    subcommand:
+      - simple
+    ceph_branch:
+      - master
+      - luminous
+
+    jobs:
+      - 'ceph-volume-nightly-{ceph_branch}-{subcommand}-{distro}-{objectstore}-{scenario}'
+
+
+- job-template:
+    name: 'ceph-volume-nightly-{ceph_branch}-{subcommand}-{distro}-{objectstore}-{scenario}'
+    display-name: 'ceph-volume {ceph_branch} {subcommand}: [{distro}-{objectstore}-{scenario}]'
+    node: vagrant&&libvirt
+    concurrent: true
+    project-type: freestyle
+    defaults: global
+    quiet-period: 5
+    block-downstream: false
+    block-upstream: false
+    properties:
+      - github:
+          url: https://github.com/ceph/ceph
+    discard-old-builds: true
+    logrotate:
+      daysToKeep: 30
+
+    triggers:
+      - timed: '@daily'
+
+    scm:
+      - git:
+          url: https://github.com/ceph/ceph.git
+          branches:
+            - ${{ceph_branch}}
+          browser: auto
+          timeout: 20
+          skip-tag: true
+          wipe-workspace: false
+
+    builders:
+      - inject:
+          properties-content: |
+            SCENARIO={scenario}
+            DISTRO={distro}
+            OBJECTSTORE={objectstore}
+            SUBCOMMAND={subcommand}
+            CEPH_BRANCH={ceph_branch}
+      - shell:
+          !include-raw-escape:
+            - ../../../scripts/build_utils.sh
+            - ../../build/build
+
+    wrappers:
+      - inject-passwords:
+          global: true
+          mask-password-params: true
+
+    publishers:
+      - postbuildscript:
+          script-only-if-succeeded: False
+          script-only-if-failed: True
+          builders:
+            - shell:
+                !include-raw-escape:
+                  - ../../../scripts/build_utils.sh
+                  - ../../build/teardown