]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible-docs: initial take on automatic docs for ceph-ansible 675/head
authorAlfredo Deza <adeza@redhat.com>
Fri, 7 Apr 2017 19:10:49 +0000 (15:10 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 7 Apr 2017 19:10:49 +0000 (15:10 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-ansible-docs/build/build [new file with mode: 0644]
ceph-ansible-docs/config/definitions/ceph-ansible-docs.yml [new file with mode: 0644]

diff --git a/ceph-ansible-docs/build/build b/ceph-ansible-docs/build/build
new file mode 100644 (file)
index 0000000..5a1114a
--- /dev/null
@@ -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=${GIT_BRANCH#*/}
+
+# create the docs build with tox
+cd $WORKSPACE/docs/
+$VENV/tox -rv
+
+# publish docs to http://docs.ceph.com/docs/ceph-ansible/$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)
+mdkir -p "/var/ceph-ansible/docs/$BRANCH"
+rsync -auv --delete .tox/docs/tmp/html/* "/var/ceph-ansible/docs/$BRANCH/"
diff --git a/ceph-ansible-docs/config/definitions/ceph-ansible-docs.yml b/ceph-ansible-docs/config/definitions/ceph-ansible-docs.yml
new file mode 100644 (file)
index 0000000..df51d94
--- /dev/null
@@ -0,0 +1,40 @@
+- job:
+    name: ceph-ansible-docs
+    node: docs
+    project-type: freestyle
+    defaults: global
+    display-name: 'ceph-ansible: docs build'
+    quiet-period: 5
+    block-downstream: false
+    block-upstream: false
+    retry-count: 3
+    properties:
+      - github:
+          url: https://github.com/ceph/ceph-ansible
+    logrotate:
+      daysToKeep: -1
+      numToKeep: 10
+      artifactDaysToKeep: -1
+      artifactNumToKeep: -1
+
+    triggers:
+      - github
+
+    scm:
+      - git:
+          url: https://github.com/ceph/ceph-ansible
+          branches:
+            - master
+            - stable-2.1
+            # as more stable branches are published, they need to be
+            # added here
+            #- stable-2.2
+          browser: auto
+          skip-tag: true
+          timeout: 20
+
+    builders:
+      - shell:
+          !include-raw:
+            - ../../../scripts/build_utils.sh
+            - ../../build/build