From: Alfredo Deza Date: Thu, 16 Oct 2014 14:37:49 +0000 (-0400) Subject: initial take on python-bindings X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6634255cc9efcb7885ab1634cb8d1ddaa86f126c;p=ceph-build.git initial take on python-bindings Signed-off-by: Alfredo Deza --- diff --git a/python-bindings/config/definitions/ensure_python_dependencies.sh b/python-bindings/config/definitions/ensure_python_dependencies.sh new file mode 100644 index 00000000..81d06699 --- /dev/null +++ b/python-bindings/config/definitions/ensure_python_dependencies.sh @@ -0,0 +1,22 @@ +#!/usr/bin/bash + +# +# This script ensures that a Python virtualenv is installed and available for +# a specific part of the build, including dependencies. +# + +# Create the virtualenv +virtualenv venv +. venv/bin/activate + +# Define and ensure the PIP cache +PIP_SDIST_INDEX="$HOME/.cache/pip" +mkdir -p $PIP_SDIST_INDEX + +# Install the package by trying with the cache first, otherwise doing a download only, and then +# trying to install from the cache again. +if ! venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index amauta; then + venv/bin/pip install --download-directory="$PIP_SDIST_INDEX" amauta + venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index amauta +fi + diff --git a/python-bindings/config/definitions/python-bindings.yml b/python-bindings/config/definitions/python-bindings.yml new file mode 100644 index 00000000..83ddfa33 --- /dev/null +++ b/python-bindings/config/definitions/python-bindings.yml @@ -0,0 +1,32 @@ +- job: + name: python-bindings + node: gitbuilder-cdep-deb-cloud-precise-amd64-basic + project-type: freestyle + defaults: global + disabled: false + display-name: 'Ceph Python Bindings' + concurrent: true + quiet-period: 5 + block-downstream: false + block-upstream: false + retry-count: 3 + + triggers: + - pollscm: "H * * * *" + + scm: + - git: + url: https://github.com/ceph/ceph.git + branches: + - master + - firefly + - giant + - next + browser: githubweb + browser-url: http://github.com/ceph/ceph.git + timeout: 20 + + builders: + - shell: + !include-raw ensure_python_dependencies.sh + - shell: "venv/bin/amauta python-bindings"