From ca2165037ebb53953d1daa835acda65d528c81e4 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Mon, 1 Dec 2014 10:52:06 -0600 Subject: [PATCH] create job to build and push teuthology docs Create a job to build teuthology docs and push them to ceph.com/teuthology/docs Signed-off-by: Andrew Schoen Reviewed-by: Ken Dreyer --- teuthology-docs-build/build/build | 24 +++++++++++++ .../definitions/teuthology-docs-build.yml | 36 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 teuthology-docs-build/build/build create mode 100644 teuthology-docs-build/config/definitions/teuthology-docs-build.yml diff --git a/teuthology-docs-build/build/build b/teuthology-docs-build/build/build new file mode 100644 index 00000000..4f690e0a --- /dev/null +++ b/teuthology-docs-build/build/build @@ -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 "ssh -i /home/jenkins-build/.ssh/cephdocs_id_rsa -o StrictHostKeyChecking=no" .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 index 00000000..66f3f41f --- /dev/null +++ b/teuthology-docs-build/config/definitions/teuthology-docs-build.yml @@ -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 -- 2.39.5