summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Hussey <sh8121@att.com>2018-07-30 14:09:11 -0500
committerScott Hussey <sh8121@att.com>2018-07-30 15:17:03 -0500
commit85a38d98eaf12a22c0d429e8be1796dde1bb1d15 (patch)
treed208c4d94199576278bf98d8a9078a9cc59e99a8
parent6104cac943bff489702f5e05b44914cc4141d503 (diff)
(zuul) Add doc build and publish jobs
Add jobs to check that documents build on check and gate and add a webhook for publishing to readthedocs.io on post. Change-Id: Ie6221222ca7be56598c7c7189c9a32817e2c0f85
Notes
Notes (review): Code-Review+2: Bryan Strassner <bryan.strassner@gmail.com> Code-Review+2: Pete Birley <pete@port.direct> Workflow+1: Pete Birley <pete@port.direct> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 30 Jul 2018 20:38:56 +0000 Reviewed-on: https://review.openstack.org/587197 Project: openstack/airship-specs Branch: refs/heads/master
-rw-r--r--.gitignore1
-rw-r--r--.zuul.yaml62
-rw-r--r--Makefile13
-rw-r--r--doc/requirements.txt2
-rw-r--r--doc/source/conf.py6
-rw-r--r--gate/playbooks/doc-build.yaml23
-rw-r--r--gate/playbooks/doc-publish.yaml23
-rw-r--r--tox.ini15
8 files changed, 134 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index 218ae64..dbd8953 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
4!/doc/source/_static/ 4!/doc/source/_static/
5/AUTHORS 5/AUTHORS
6/ChangeLog 6/ChangeLog
7.tox
diff --git a/.zuul.yaml b/.zuul.yaml
new file mode 100644
index 0000000..0c69786
--- /dev/null
+++ b/.zuul.yaml
@@ -0,0 +1,62 @@
1- project:
2 check:
3 jobs:
4 - airship-specs-doc-build
5
6 gate:
7 jobs:
8 - airship-specs-doc-build
9
10 post:
11 jobs:
12 - airship-specs-doc-publish
13
14- nodeset:
15 name: airship-specs-single-node
16 nodes:
17 - name: primary
18 label: ubuntu-xenial
19
20- job:
21 name: airship-specs-doc-build
22 description: |
23 Build documents locally to validate functionality
24 run: gate/playbooks/doc-build.yaml
25 timeout: 900
26 nodeset: airship-specs-single-node
27
28- job:
29 name: airship-specs-doc-publish
30 description: |
31 Publish documentation on airship-specs.readthedocs.io
32 run: gate/playbooks/doc-publish.yaml
33 secrets:
34 - airship_specs_readthedocs
35 timeout: 300
36 nodeset: airship-specs-single-node
37
38- secret:
39 name: airship_specs_readthedocs
40 data:
41 url: !encrypted/pkcs1-oaep
42 - w+FhusV0G8CTwapZN61r2y/X2hqy94gW8DocxV2voO/g0oNm+esDhDUxUR4XaihU+68yL
43 VOhbUbWBAGFs3oHGEPQMzMeSuSIFgctp9v91tLnECulNzmXm44pLr000w61EA2K5H2YRI
44 n9T8vOCBLSOnw4jjxp4I1G0x4uAZv6JNzk112hkwvEAyGsGBm00M88nJiNEHm1luIRt2Q
45 adS3hMFDLvpJ2D3C286bGeuCTbYWVMhPic11rMtMHOigQwrQs/pUWQgh+W06fg6G9Iokn
46 W4bWVVHdRVgRx08eG13Mec8J0Qn+sQhU8/cpZOob/XuYh5+jntTnTqB7Ig/xOY1AY9isy
47 yyaXHcQ/KJ7Px6kDfckIp9rlwnQ8vU53CnTgHaColx/2Qsrzaww/52JvBUGp/61Y/Folu
48 /UF2jnHBSIAT6hRosbkZcLY45J0sDBFcKXBJi9p/5CJTCX+Dg1OKL4hEPX2p1KQzGz+T6
49 uQiRbts5/+RpXE2qgw+RGhORIdLTxokKwyeNf+j0OBGMbho/eIo3gybo0AvPiDRwnBA6F
50 wd4Ub+z3tDGmt+9U8eLcTWRSArqlBFjgf9DMs2u4D1pXAtXXi0QYYF5YgnJWfVHAHVwkO
51 e2n7MMBVs/cHEryC8jYVC9R6yOcaJPY3q3FujQIYLiH0op2cRUeTOIgP4REMwg=
52 token: !encrypted/pkcs1-oaep
53 - JpdDUf95LcYP3ZblOsky/fkScHgOvXeSIS7OpBmWTHRTjWDKi6ZcmFwT1AA5h1oH0dKBC
54 8p40U4zVXfJg2S0aXbo8/VPNLfC2QwZG+vJqsrm+7O3Db2rahwwWqBv4DYsazcrlFtsjZ
55 MA8Qb+NAS68f2gSWbLu3tR8f6wf18J++hc3E3lfa+Qzt2hQDIkjXyPaFWavuzftw6ny4G
56 ViKHn503HEJ3wyGVZ/OzI/F7AOCnGo08QURSD7+1+ktp0FB9Namn6BfaKPKTunaMq1ECV
57 rJIubFmbz3Zv0r+H/eU1sJrFbSY+TcgHC9aSDU2jXfmGsiABptSGPoaqkjio7WSWlRQNg
58 77ws8o1kZTagW9fS1ohJ2lFnEBmWtATY5jaOsvdc6zmzmTpFgyxmaYZrmZMU5X7yO/iDa
59 Sn2CM2II6BecLtVi3VQTBCVEGqo9JVqD8NU1dDz5arz56+p+QBLv4YpjhHLe4A3Z5FmOo
60 qYrJiRZpx0gVgxJiWx58XJJ3UvlN9LpjCxRoySlL9KPYJFzRmbDUSuduf9scJ5EbzsaQ/
61 fIxmjGBs9LKjo+2wppRtabVQK+YyQ5KZW+fMzheAqwJt7uB1aJ5XMS8UZWDxH6/bgW8RH
62 MQK7Hi+9HD8GWsTm5YcdXuIZmhw27/iFoY0dcgBYiIrhMHwDXi9MzaZSfBeuzY=
diff --git a/Makefile b/Makefile
index 50bd7da..1e77038 100644
--- a/Makefile
+++ b/Makefile
@@ -2,19 +2,14 @@
2# 2#
3 3
4# You can set these variables from the command line. 4# You can set these variables from the command line.
5# TODO: Incorporate these vars into tox file
5SPHINXOPTS = -a -E -W 6SPHINXOPTS = -a -E -W
6SPHINXBUILD = sphinx-build 7SPHINXBUILD = sphinx-build
7SPHINXPROJ = airship-specs 8SPHINXPROJ = airship-specs
8SOURCEDIR = doc/source 9SOURCEDIR = doc/source
9BUILDDIR = doc/build 10BUILDDIR = doc/build
10 11
11# Put it first so that "make" without argument is like "make help". 12docs:
12help: 13 tox
13 @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 14
15.PHONY: help Makefile 15%: docs
16
17# Catch-all target: route all unknown targets to Sphinx using the new
18# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19%: Makefile
20 @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file
diff --git a/doc/requirements.txt b/doc/requirements.txt
new file mode 100644
index 0000000..f6e8d8b
--- /dev/null
+++ b/doc/requirements.txt
@@ -0,0 +1,2 @@
1sphinx==1.7.6
2sphinx_rtd_theme==0.4.1
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 6bfbdef..119288f 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -5,6 +5,7 @@
5# This file does only contain a selection of the most common options. For a 5# This file does only contain a selection of the most common options. For a
6# full list see the documentation: 6# full list see the documentation:
7# http://www.sphinx-doc.org/en/master/config 7# http://www.sphinx-doc.org/en/master/config
8import sphinx_rtd_theme
8 9
9# -- Path setup -------------------------------------------------------------- 10# -- Path setup --------------------------------------------------------------
10 11
@@ -74,7 +75,8 @@ pygments_style = 'sphinx'
74# The theme to use for HTML and HTML Help pages. See the documentation for 75# The theme to use for HTML and HTML Help pages. See the documentation for
75# a list of builtin themes. 76# a list of builtin themes.
76# 77#
77html_theme = 'alabaster' 78html_theme = "sphinx_rtd_theme"
79html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
78 80
79# Theme options are theme-specific and customize the look and feel of a theme 81# Theme options are theme-specific and customize the look and feel of a theme
80# further. For a list of options available for each theme, see the 82# further. For a list of options available for each theme, see the
@@ -152,4 +154,4 @@ texinfo_documents = [
152 (master_doc, 'airship-specs', 'airship-specs Documentation', 154 (master_doc, 'airship-specs', 'airship-specs Documentation',
153 author, 'airship-specs', 'One line description of project.', 155 author, 'airship-specs', 'One line description of project.',
154 'Miscellaneous'), 156 'Miscellaneous'),
155] \ No newline at end of file 157]
diff --git a/gate/playbooks/doc-build.yaml b/gate/playbooks/doc-build.yaml
new file mode 100644
index 0000000..b7e4459
--- /dev/null
+++ b/gate/playbooks/doc-build.yaml
@@ -0,0 +1,23 @@
1# Licensed under the Apache License, Version 2.0 (the "License");
2# you may not use this file except in compliance with the License.
3# You may obtain a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS,
9# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10# See the License for the specific language governing permissions and
11# limitations under the License.
12
13# Combine several test tasks into a single playbook
14# to minimize Zuul node consumption
15
16- hosts: primary
17 tasks:
18 - name: Build documents locally
19 make:
20 chdir: "{{ zuul.project.src_dir }}"
21 target: docs
22 register: result
23
diff --git a/gate/playbooks/doc-publish.yaml b/gate/playbooks/doc-publish.yaml
new file mode 100644
index 0000000..ee6dac7
--- /dev/null
+++ b/gate/playbooks/doc-publish.yaml
@@ -0,0 +1,23 @@
1# Licensed under the Apache License, Version 2.0 (the "License");
2# you may not use this file except in compliance with the License.
3# You may obtain a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS,
9# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10# See the License for the specific language governing permissions and
11# limitations under the License.
12
13- hosts: primary
14 tasks:
15 - name: Publish current merged documents on readthedocs
16 no_log: true
17 uri:
18 method: 'POST'
19 body_format: 'json'
20 url: '{{ airship_specs_readthedocs.url | trim}}'
21 body:
22 token: '{{ airship_specs_readthedocs.token | trim }}'
23 register: result
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..2af17a6
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,15 @@
1[tox]
2envlist = docs
3skipsdist = True
4
5[testenv]
6basepython=python3
7deps=
8 -rdoc/requirements.txt
9
10[testenv:docs]
11whitelist_externals=
12 rm
13commnds=
14 rm -rf doc/build
15 sphinx-build -b html doc/source doc/build -a -E -W