Browse Source

Add docs build and publish

Added local documentation build and publishing to the readthedocs.

Change-Id: Iab06eb55d7859916f2b938191a5415ac57be0f44
Roman Gorshunov 9 months ago
parent
commit
cd0c023425
6 changed files with 103 additions and 4 deletions
  1. 1
    0
      .gitignore
  2. 49
    0
      .zuul.yaml
  3. 6
    2
      Makefile
  4. 20
    0
      tools/gate/playbooks/doc-build.yaml
  5. 25
    0
      tools/gate/playbooks/doc-publish.yaml
  6. 2
    2
      tox.ini

+ 1
- 0
.gitignore View File

@@ -1,6 +1,7 @@
1 1
 # Sphinx documentation
2 2
 doc/_build/
3 3
 doc/build/
4
+.tox
4 5
 
5 6
 # OSX folder settings files
6 7
 .DS_Store

+ 49
- 0
.zuul.yaml View File

@@ -14,11 +14,60 @@
14 14
     check:
15 15
       jobs:
16 16
         - airship-in-a-bottle-linter
17
+        - airship-in-a-bottle-doc-build
17 18
     gate:
18 19
       jobs:
19 20
         - airship-in-a-bottle-linter
21
+        - airship-in-a-bottle-doc-build
22
+    post:
23
+      jobs:
24
+        - airship-in-a-bottle-doc-publish
20 25
 
21 26
 - job:
22 27
     name: airship-in-a-bottle-linter
23 28
     run: tools/gate/playbooks/zuul-linter.yaml
24 29
     nodeset: openstack-helm-single-node
30
+
31
+- job:
32
+    name: airship-in-a-bottle-doc-build
33
+    description: |
34
+      Locally build the documentation to check for errors
35
+    run: tools/gate/playbooks/doc-build.yaml
36
+    timeout: 300
37
+    nodeset: openstack-helm-single-node
38
+
39
+- job:
40
+    name: airship-in-a-bottle-doc-publish
41
+    description: |
42
+      Publish documentation on airship-drydock.readthedocs.io
43
+    run: tools/gate/playbooks/doc-publish.yaml
44
+    secrets:
45
+      - airship_in_a_bottle_readthedocs
46
+    timeout: 300
47
+    nodeset: openstack-helm-single-node
48
+
49
+- secret:
50
+    name: airship_in_a_bottle_readthedocs
51
+    data:
52
+      url: !encrypted/pkcs1-oaep
53
+        - Uml3UChtbn2PP4DbTsf4qC2rStfp07DuWe5NN5pS0KIcOenbD0QX7hvx2MgQkChyKTDTs
54
+          QhiHolVNAoKCcoHjF8WjFXnk7lVb1Ap4K23J/BFO22OvfziMLEcWfsPIr7a7vHQ/svaiy
55
+          5YYqHCcJYD43CyzsJKUA7Wjfz+JHu9ZpQQGQY53H/UKxMnou3yuFNjLkCp7jQN7ZAIBX2
56
+          3IrmstRbhZtJTuQ0+Pncr6t3eSPssc6AU+EG4wlBIp+/MxqsIDkEz3AjWiEkMhxUOEIj6
57
+          nN9Evswpkyg16u4mDnFJ5vRU73e/cR95I4g5TAXbqD8Ek0PDlL1CXWeyJsabBw/UDhdBz
58
+          8zGa2o/lke3Wn47asEcs5nyP+DX8rIphXTT8YXjnzrL8Lvj9kaRHqvFcIX29x9gr3diev
59
+          l6CE7hxPtVLU2PsBWCVjxlkX46OockIWoDJJ4Q9tmpilGPlxlDVhJ485bW0dr8EJFdnGV
60
+          9eJBGFamrZLiH5h6mOiDtqO1MnuXMLHeA7gnxcRlAC51jh5LzjQFh2wQ9K41T3oZXp+sE
61
+          TR6pfIsQzTdFl2LMLs+UXRULGcDciJDUxySkTF+W3FEIuMBPN2beL0JFQuPdKbbl0pcpn
62
+          gCZ/ok3a83q6WMrl68Si6ODJeLSyJ8lRc3m6tADgGekcRfaT2C/BjD6yEvsJiM=
63
+      token: !encrypted/pkcs1-oaep
64
+        - SZLvIg3x9of5ORJJsH5BSZVPG5xtoTFWvFaPSAp6T0JIdYcbx03RXnZx3ZAftwQwv908X
65
+          OycWj3QrIIfXa8rmS7pJ3H3cNBXjB5KISiqWu00u5K2ZOiWt30NrKy3gU0cuyi2iBo38u
66
+          W034X5Z6onswmzIsvGs7DxxGcSq+RF/2hqAspdzGj7carW3QZoQLkmDDHScnRenH8IB4+
67
+          XMX/4gO63tqyZGczrd18O+4AlLdRFcAR7ScuVnSpr6KnxyBUfvOec83swS1F60wTniFe5
68
+          4GwUKcqWG9C4HjoJ4D0+xGO1ZnPd03w1T/mBTU79z86p9IL2rFrJcSwxshKPWDTY+JrmT
69
+          K9Zn1GYaPJk6oDeHNmJz7b66zcbf8glb2D9KAWeNeCfX+oUPZDw+1ePtGTKV1DcWoQFhp
70
+          L5IHgyrixkT4hO4LvuRAn0ZRWjV/MWh618HzbgB5785GJlnSnBgeDFcy9+AbmhoWh37C3
71
+          y7tIF6i8j8Jvlsazmj7XfUeNqLB6V7ibMXc1yKMUBhwMKFLYgAOJbMRtS338Uqj4GCSFa
72
+          78q40byAbR0O6uHiCtZxrEvAUKz3LJcd+jpKfnSDtnLPAs4je7YUNaCYkGPZnSeaY0XuU
73
+          2Xjb0r3VK7XNIy8hwC5hj/nb8LGU6Q41mKSSVGF41pK8dLEa4X+LJn21PGDbBI=

+ 6
- 2
Makefile View File

@@ -1,4 +1,4 @@
1
-# Copyright 2017 AT&T Intellectual Property.  All other rights reserved.
1
+# Copyright 2018 AT&T Intellectual Property.  All other rights reserved.
2 2
 #
3 3
 # Licensed under the Apache License, Version 2.0 (the "License");
4 4
 # you may not use this file except in compliance with the License.
@@ -11,7 +11,11 @@
11 11
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 12
 # See the License for the specific language governing permissions and
13 13
 # limitations under the License.
14
+SHELL = /bin/bash
14 15
 
15 16
 .PHONY: docs
16
-docs:
17
+docs: build_docs
18
+
19
+.PHONY: build_docs
20
+build_docs:
17 21
 	tox -e docs

+ 20
- 0
tools/gate/playbooks/doc-build.yaml View File

@@ -0,0 +1,20 @@
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: Build documents locally
16
+      make:
17
+        chdir: "{{ zuul.project.src_dir }}"
18
+        target: docs
19
+      register: result
20
+      failed_when: result.failed

+ 25
- 0
tools/gate/playbooks/doc-publish.yaml View File

@@ -0,0 +1,25 @@
1
+# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
2
+#
3
+# Licensed under the Apache License, Version 2.0 (the "License");
4
+# you may not use this file except in compliance with the License.
5
+# You may obtain a copy of the License at
6
+#
7
+#     http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+# Unless required by applicable law or agreed to in writing, software
10
+# distributed under the License is distributed on an "AS IS" BASIS,
11
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+# See the License for the specific language governing permissions and
13
+# limitations under the License.
14
+
15
+- hosts: primary
16
+  tasks:
17
+    - name: Publish current merged documents on readthedocs
18
+      no_log: true
19
+      uri:
20
+        method: POST
21
+        body_format: 'json'
22
+        body:
23
+          token: '{{ airship_in_a_bottle_readthedocs.token | trim }}'
24
+        url: '{{ airship_in_a_bottle_readthedocs.url | trim }}'
25
+        follow_redirects: all

+ 2
- 2
tox.ini View File

@@ -13,7 +13,7 @@ install_command = pip install {opts} {packages}
13 13
 [testenv:docs]
14 14
 basepython = python3
15 15
 deps = -r{toxinidir}/doc/requirements.txt
16
+whitelist_externals = rm
16 17
 commands =
17 18
     rm -rf doc/build
18
-    sphinx-build -W -b html doc/source doc/build/html
19
-whitelist_externals = rm
19
+    sphinx-build -W -b html doc/source doc/build

Loading…
Cancel
Save