]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
initial take on python-bindings
authorAlfredo Deza <alfredo@deza.pe>
Thu, 16 Oct 2014 14:37:49 +0000 (10:37 -0400)
committerAlfredo Deza <alfredo@deza.pe>
Thu, 16 Oct 2014 14:37:49 +0000 (10:37 -0400)
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
python-bindings/config/definitions/ensure_python_dependencies.sh [new file with mode: 0644]
python-bindings/config/definitions/python-bindings.yml [new file with mode: 0644]

diff --git a/python-bindings/config/definitions/ensure_python_dependencies.sh b/python-bindings/config/definitions/ensure_python_dependencies.sh
new file mode 100644 (file)
index 0000000..81d0669
--- /dev/null
@@ -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 (file)
index 0000000..83ddfa3
--- /dev/null
@@ -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"