]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
create job to build and push teuthology docs
authorAndrew Schoen <aschoen@redhat.com>
Mon, 1 Dec 2014 16:52:06 +0000 (10:52 -0600)
committerKen Dreyer <kdreyer@redhat.com>
Mon, 1 Dec 2014 17:53:54 +0000 (10:53 -0700)
Create a job to build teuthology docs and push them to
ceph.com/teuthology/docs

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
teuthology-docs-build/build/build [new file with mode: 0644]
teuthology-docs-build/config/definitions/teuthology-docs-build.yml [new file with mode: 0644]

diff --git a/teuthology-docs-build/build/build b/teuthology-docs-build/build/build
new file mode 100644 (file)
index 0000000..4f690e0
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -ex
+
+# 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 tox; then
+    venv/bin/pip install --download-directory="$PIP_SDIST_INDEX" tox
+    venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index tox
+fi
+
+
+# create the docs build with tox
+tox -rv -e docs
+# publish docs to ceph.com/teuthology/docs
+rsync -auv --delete -e &quot;ssh -i /home/jenkins-build/.ssh/cephdocs_id_rsa -o StrictHostKeyChecking=no&quot; .tox/docs/tmp/html/* cephdocs@ceph.newdream.net:/home/ceph_site/ceph.com/teuthology/docs/
diff --git a/teuthology-docs-build/config/definitions/teuthology-docs-build.yml b/teuthology-docs-build/config/definitions/teuthology-docs-build.yml
new file mode 100644 (file)
index 0000000..66f3f41
--- /dev/null
@@ -0,0 +1,36 @@
+- job:
+    name: teuthology-docs-build 
+    node: gitbuilder-cdep-deb-cloud-precise-amd64-basic
+    project-type: freestyle
+    defaults: global
+    disabled: false
+    display-name: 'Teuthology: Docs Build'
+    concurrent: false
+    quiet-period: 5
+    block-downstream: false
+    block-upstream: false
+    retry-count: 3
+    properties:
+      - github:
+          url: https://github.com/ceph/teuthology
+    logrotate:
+      daysToKeep: -1 
+      numToKeep: -1 
+      artifactDaysToKeep: -1
+      artifactNumToKeep: -1
+
+    triggers:
+      - pollscm: "* * * * *"
+
+    scm:
+      - git:
+          url: https://github.com/ceph/teuthology.git
+          branches:
+            - master 
+          browser: githubweb
+          browser-url: https://github.com/ceph/teuthology.git
+          timeout: 20
+
+    builders:
+      - shell:
+          !include-raw ../../build/build