diff --git a/.gitignore b/.gitignore
index 22df97651c1ee1bf107400e33a4ec199f73886cf..c81ae116be42f6f966114e84b1a1347f6ea4b1de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,8 +21,8 @@ pip-log.txt
# Unit test / coverage reports
.coverage
.tox
-coverage.xml
-nosetests.xml
+coverage*.xml
+nosetests*.xml
#Translations
*.mo
diff --git a/.travis.yml b/.travis.yml
index 3804b4260457ca1b7f0c693fe0a6385ee3978025..17f7c36ed07c6df8f86b10c2a249af8e82c953d4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,9 @@ env:
- CHERRYPY=9
- CHERRYPY=10
- CHERRYPY=11
+ - CHERRYPY=12
+ - CHERRYPY=13
+ - CHERRYPY=14
# Make sure to exclude python3.4 + CherryPy 3.2.2
# This configuration is not supported.
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000000000000000000000000000000000000..d54838ac7f417aa058b7403c1c20d2e59dc66d73
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,103 @@
+def axisImages = ['jessie', 'stretch']
+def axisPython = ['py27', 'py3']
+def axisCherrypy = ['cherrypy35','cherrypy4','cherrypy5','cherrypy6','cherrypy7','cherrypy8','cherrypy9','cherrypy10','cherrypy11','cherrypy12','cherrypy13','cherrypy14']
+
+
+def builders = [:]
+for (x in axisImages) {
+for (y in axisPython) {
+for (z in axisCherrypy) {
+ // Need to bind the label variable before the closure - can't do 'for (label in labels)'
+ def image = x
+ def python = y
+ def cherrypy = z
+ def env = "${python}-${cherrypy}"
+
+ // Create a map to pass in to the 'parallel' step so we can fire all the builds at once
+ builders["${image}-${env}"] = {
+ node {
+ /* Requires the Docker Pipeline plugin to be installed */
+ docker.image("ikus060/docker-debian-py2-py3:${image}").inside {
+ stage("${image}-${env}:Initialize") {
+ // Wipe working directory to make sure to build clean.
+ deleteDir()
+ // Checkout
+ checkout scm
+ echo 'Enforce timezone for tests to work.'
+ sh 'ln -snf /usr/share/zoneinfo/America/Montreal /etc/localtime && echo "America/Montreal" > /etc/timezone'
+ echo 'Upgrade python and install dependencies to avoid compiling from sources.'
+ sh 'apt-get update && apt-get -qq install python-pysqlite2 libldap2-dev libsasl2-dev rdiff-backup node-less'
+ sh 'pip install pip setuptools tox --upgrade'
+ }
+ stage("${image}-${env}:Build") {
+ echo 'Compile catalog and less'
+ sh 'python setup.py build'
+ }
+ stage("${image}-${env}:Test") {
+ try {
+ sh "tox --recreate --workdir /tmp --sitepackages -e ${env}"
+ } finally {
+ junit "nosetests-${env}.xml"
+ step([$class: 'CoberturaPublisher', coberturaReportFile: "coverage-${env}.xml"])
+ }
+ }
+ }
+ }
+ }
+}}}
+
+parallel builders
+
+node {
+ stage ('Publish') {
+ if (env.BRANCH_NAME == 'master') {
+ // Wipe working directory to make sure to build clean.
+ deleteDir()
+ // Checkout
+ checkout scm
+ // Define version
+ def pyVersion = sh(
+ script: 'python setup.py --version | tail -n1',
+ returnStdout: true
+ ).trim()
+ def version = pyVersion.replaceFirst(".dev.*", ".${BUILD_NUMBER}")
+
+ // Push changes to git
+ withCredentials([usernamePassword(credentialsId: 'gitlab-jenkins', usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD')]) {
+ sh """
+ sed -i.bak -r "s/version='(.*).dev.*'/version='${version}'/" setup.py
+ git config --local user.email "jenkins@patrikdufresne.com"
+ git config --local user.name "Jenkins"
+ git commit setup.py -m 'Release ${version}'
+ git tag '${version}'
+ git push http://${GIT_USERNAME}:${GIT_PASSWORD}@git.patrikdufresne.com/pdsl/rdiffweb.git --tags
+ """
+ }
+
+
+ // Publish to pypi
+ docker.image("ikus060/docker-debian-py2-py3:jessie").inside {
+ withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'ikus060-pypi', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
+ sh """
+ cat > ~/.pypirc << EOF
+[distutils]
+index-servers =
+ pypi
+
+[pypi]
+username=${USERNAME}
+password=${PASSWORD}
+EOF
+ """
+ writeFile file: "/root/.pypirc", text: """
+
+ """
+ sh 'cat /root/.pypirc'
+ sh 'pip install wheel --upgrade'
+ sh 'python setup.py sdist bdist_wheel upload -r pypi'
+ }
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index 36dcde1775d4e47cf15717c540d5f9a2d76758a3..0000000000000000000000000000000000000000
--- a/requirements.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-# rdiffweb, A web interface to rdiff-backup repositories
-# Copyright (C) 2014 rdiffweb contributors
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-CherryPy>=3.5.0
-Jinja2>=2.6
-babel>=1.3
-future>=0.15.2
-pycrypto>=2.6.1
-mock>=1.3.0
-psutil>=2.1.1
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 7fea065913988ff369d804ed3955ae991a64a10c..bec96a047d11be32c97a89c49fa0f466f47bad69 100644
--- a/setup.py
+++ b/setup.py
@@ -281,7 +281,6 @@ setup(
],
# requirement for testing
tests_require=[
- "tox",
"mock>=1.3.0",
"coverage>=4.0.1",
"mockldap>=0.2.6",
diff --git a/tox.ini b/tox.ini
index 515d5e51b120ac9e95cb45a92bc88b33a88b56d3..3d6e90af3d450117b3869dcd8d99ccfa6d124e1c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,7 +15,7 @@
# along with this program. If not, see .
[tox]
-envlist = py{27,34}-cherrypy{35,4,5,6,7,8,9,10,11},py27-cherrypy32
+envlist = py{27,3}-cherrypy{35,4,5,6,7,8,9,10,11},py27-cherrypy32
[testenv]
deps=
@@ -31,7 +31,10 @@ deps=
cherrypy9: cherrypy>=9.0.0,<10.0.0
cherrypy10: cherrypy>=10.0.0,<11.0.0
cherrypy11: cherrypy>=11.0.0,<12.0.0
-commands=python setup.py nosetests --xunit-file=nosetests-{envname}.xml --xunit-testsuite-name={envname}
+ cherrypy12: cherrypy>=12.0.0,<13.0.0
+ cherrypy13: cherrypy>=13.0.0,<14.0.0
+ cherrypy14: cherrypy>=14.0.0,<15.0.0
+commands=python setup.py nosetests --xunit-file=nosetests-{envname}.xml --xunit-testsuite-name={envname} --cover-xml-file=coverage-{envname}.xml
[travis:env]
CHERRYPY =
@@ -44,4 +47,7 @@ CHERRYPY =
8: cherrypy8
9: cherrypy9
10: cherrypy10
- 11: cherrypy11
\ No newline at end of file
+ 11: cherrypy11
+ 12: cherrypy12
+ 13: cherrypy13
+ 14: cherrypy14
\ No newline at end of file