From 75cb1559dff6aec11ca23404b12a0379c15ee878 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 27 Jun 2017 14:28:32 -0400 Subject: [PATCH] ceph-medic-docs: create a docs job Signed-off-by: Alfredo Deza --- ceph-medic-docs/build/build | 21 ++++++++++ .../config/definitions/ceph-medic-docs.yml | 39 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 ceph-medic-docs/build/build create mode 100644 ceph-medic-docs/config/definitions/ceph-medic-docs.yml diff --git a/ceph-medic-docs/build/build b/ceph-medic-docs/build/build new file mode 100644 index 00000000..5f99f47c --- /dev/null +++ b/ceph-medic-docs/build/build @@ -0,0 +1,21 @@ +#!/bin/bash + +set -ex + +# the following two methods exist in scripts/build_utils.sh +pkgs=( "tox" ) +install_python_packages "pkgs[@]" + +# trims leading slashes +BRANCH=`branch_slash_filter ${GIT_BRANCH}` + +# create the docs build with tox +$VENV/tox -rv -e docs + +# publish docs to http://docs.ceph.com/ceph-medic/$BRANCH/ create +# a `$BRANCH` dir because the project has stable branches that will +# publish docs that might be different from other versions (similar, +# but not exactly the same to what the Ceph project does) +mkdir -p "/var/ceph-medic/docs/$BRANCH" +rsync -auv --delete .tox/docs/tmp/html/* "/var/ceph-medic/docs/$BRANCH/" + diff --git a/ceph-medic-docs/config/definitions/ceph-medic-docs.yml b/ceph-medic-docs/config/definitions/ceph-medic-docs.yml new file mode 100644 index 00000000..07565461 --- /dev/null +++ b/ceph-medic-docs/config/definitions/ceph-medic-docs.yml @@ -0,0 +1,39 @@ +- job: + name: ceph-medic-docs + node: docs + project-type: freestyle + defaults: global + display-name: 'ceph-medic: docs build' + quiet-period: 5 + block-downstream: false + block-upstream: false + retry-count: 3 + properties: + - github: + url: https://github.com/ceph/ceph-medic + logrotate: + daysToKeep: -1 + numToKeep: 10 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + + triggers: + - github + + scm: + - git: + url: https://github.com/ceph/ceph-medic + branches: + - master + # as more stable branches are published, they need to be + # added here + #- stable-1.0 + browser: auto + skip-tag: true + timeout: 20 + + builders: + - shell: + !include-raw: + - ../../../scripts/build_utils.sh + - ../../build/build -- 2.39.5