#!/bin/bash
# the following two methods exist in scripts/build_utils.sh
-pkgs=( "pytest" "docker-py==1.10.3" )
+pkgs=( "tox" )
install_python_packages "pkgs[@]"
+# XXX this might not be needed
+source $VENV/activate
+
+WORKDIR=$(mktemp -td tox.XXXXXXXXXX)
+
sudo apt-get install -y docker.io
sudo gpasswd -a ${USER} docker
sudo systemctl restart docker
newgrp docker
-cd tests
# 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
# 'Permission Denied` when tryin to talk over the socket
-sg docker -c "$VENV/py.test -v"
+sg docker -c "$VENV/tox -rv -e=$SCENARIO --workdir=$WORKDIR"
--- /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/ceph-ansible/tests/functional
+
+scenarios=$(find . | grep Vagrantfile | xargs dirname)
+
+for scenario in $scenarios; do
+ cd $scenario
+ vagrant destroy -f
+ cd -
+done
-- job:
+- project:
name: ceph-docker-nightly
- node: xenial && x86_64
- project-type: freestyle
+ scenario:
+ - ceph_ansible2.1-jewel-centos7_cluster
+ - ceph_ansible2.1-jewel-xenial_cluster
+ - ceph_ansible-jewel-centos7_cluster
+ - ceph_ansible-jewel-xenial_cluster
+ - ceph_ansible-kraken-centos7_cluster
+ - ceph_ansible-kraken-xenial_cluster
+ jobs:
+ - 'ceph-docker-nightly-{scenario}'
+
+
+- job-template:
+ name: 'ceph-docker-nightly-{scenario}'
+ node: vagrant&&libvirt
+ concurrent: true
defaults: global
- display-name: 'ceph-docker: Nightly tests for released containers'
+ display-name: 'ceph-docker: Nightly tests [{scenario}]'
quiet-period: 5
block-downstream: false
block-upstream: false
- github:
url: https://github.com/ceph/ceph-docker
logrotate:
- daysToKeep: -1
- numToKeep: -1
+ daysToKeep: 15
+ numToKeep: 30
artifactDaysToKeep: -1
artifactNumToKeep: -1
+ parameters:
+ - string:
+ name: BRANCH
+ description: "A ceph-docker branch to test"
+ default: master
+
triggers:
- timed: '@daily'
- git:
url: https://github.com/ceph/ceph-docker.git
branches:
- - master
+ - ${{BRANCH}}
browser: auto
timeout: 20
builders:
+ - inject:
+ properties-content: |
+ SCENARIO={scenario}
- shell:
- !include-raw:
+ !include-raw-escape:
- ../../../scripts/build_utils.sh
- ../../build/build
+
+ publishers:
+ - postbuildscript:
+ script-only-if-succeeded: False
+ script-only-if-failed: True
+ builders:
+ - shell: !include-raw ../../build/teardown