Browse Source

Merge "Unify publishing of docs"

Zuul 6 months ago
parent
commit
358f047c33
6 changed files with 40 additions and 122 deletions
  1. 16
    61
      .zuul.yaml
  2. 20
    11
      Makefile
  3. 3
    3
      README.rst
  4. 0
    23
      gate/playbooks/doc-build.yaml
  5. 0
    23
      gate/playbooks/doc-publish.yaml
  6. 1
    1
      tox.ini

+ 16
- 61
.zuul.yaml View File

@@ -1,62 +1,17 @@
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
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.
19 12
 
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
-        - THj6TIhcV42OhTsG1mA59bUbeKNd/64KCt2Bnqh8D+Fjr2VbaojqHT51/UhuRf+y4BKDi
43
-          Hlaf0kNUS0X4VB5QanDh/mKlU/GhMIyUBCD1PlzMxiefcVl04F+Z0GKlPXJ+qzKYRYK6F
44
-          2i4m8PeCGa8otqUiiqznY0US5Rb0++dEZ6ipuFuaLDl7mmV4MqWuPVJdpBuYqsH/OP6Hd
45
-          VPvSw68Arbqo7n/hriCoI5ZVx9Xk8xhfSTCkUDjhEaHEr+ECTPZLxqmArPEi+gGwEqiLa
46
-          LWwftEeDc2OaSL0X8XlAcCGFYJeLRp5uCTIOh2T0HuIgZxPJ1aHyvvyd3ieyw+ndx27og
47
-          DYPf3/svoYWBaDkQpFQpYFWIwMnzKiZp5giOb2XIr3co43gu/nT49UZJSkc2MPtWMArRb
48
-          CHkj7/MF+lHEDlCEGC+x0u+B1t1Qn++JWVXMDEhHm+KUJ83Q0QSUC1ImJgKgDHWeGAMK/
49
-          6OABOer4D6qG88PHaoSmiKrX7o9tjiuPkVfZYrKjgQSXRj8Iv1GSHdQCjcit/HNFx75Lu
50
-          yPmkFA5XzGXAHNpt33ktib5/ZVzYdFV7lFoNDxs2cDb+qJvD1zAL8rDgwOk7cjv1qWHR+
51
-          1VgnGBiWamD0SRCMY0beTjWQpouius5mfI+d+LPlNr8i1okic6sd2vhG93HMpw=
52
-      token: !encrypted/pkcs1-oaep
53
-        - ZYf6430ZTYgnN3HnbFMUqb0Q8iQWmhpns1UutcWuhOjDYBT7NBvmjJRoAzKTL4JI9qpbm
54
-          EIL2BwpmSGRmJauzJKaTxTitRTGkLZB9nBsBjKw3tu/ga1Mz18IWfKoJWFfhs+omd/YgZ
55
-          DX1nf8I+2Dmmee+lbGfkd8Km39hXRVEkDdT/9fRH7w0JJullf/LHJlQs+mQuGxj4S6lQ0
56
-          GINVneKZKj7EOsoOQexGLDnOjrLDyfUHJiPRTZsg4VTDng/yRb9jJfbph5aTX1QRA2ldp
57
-          VsO4PZhYOiR30SYcNbUELhA/ZKXYeUWrG4hsI8oeO4dCU5cLPMFkh8i+6fvHRjPvPohOl
58
-          fj5xNHbz/wHOHlFFLYX2fs2WCRKdX7g8m/nxiN5ofttNq+k99Is5r30iMUXGzoIG8viSb
59
-          dOcHRXRrFnIa5ZUD4g3QgGnayxXxK9tJqCrW1N9MwfFOIb1kgRCvrGDaho9cOcFshQPTP
60
-          UfsGHncnV87elimGN/tYf8oAU5FWIzzh8xF/kT1e8mVxGrF4BfBV2/Iy26M0MlbeFqMXY
61
-          oWgYCTt57yMhrhdqqRrrYsa/5C5rTv6J+cpPv+VtRo6AQm6KLwBl5sLNuCiBZigKDdwwn
62
-          F/MZZpDi9gkGouoDm6lR+Kje5zpWvdUwJC2TfLst1qFk23FqshAGuOBI9tTRws=
13
+- project:
14
+    templates:
15
+      - docs-on-readthedocs
16
+    vars:
17
+      rtd_webhook_id: '43959'

+ 20
- 11
Makefile View File

@@ -1,15 +1,24 @@
1
-# Minimal makefile for Sphinx documentation
1
+# Copyright 2018 AT&T Intellectual Property.  All other rights reserved.
2 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.
3 14
 
4
-# You can set these variables from the command line.
5
-# TODO: Incorporate these vars into tox file
6
-SPHINXOPTS    = -a -E -W
7
-SPHINXBUILD   = sphinx-build
8
-SPHINXPROJ    = airship-specs
9
-SOURCEDIR     = doc/source
10
-BUILDDIR      = doc/build
15
+.PHONY: docs
16
+docs: clean build_docs
11 17
 
12
-docs:
13
-	tox
18
+.PHONY: clean
19
+clean:
20
+	rm -rf doc/build
14 21
 
15
-%: docs
22
+.PHONY: build_docs
23
+build_docs:
24
+	tox -e docs

+ 3
- 3
README.rst View File

@@ -10,9 +10,9 @@
10 10
 Building Airship Specs Documentation
11 11
 ====================================
12 12
 
13
-Using the equivalent of `pip install sphinx`, install the sphinx-build command
14
-if it is not already installed.
13
+Find more documentation for Airship Specs on
14
+`Read the Docs <https://airship-specs.readthedocs.io/>`_.
15 15
 
16
-From the root of this project, issue the command `make html`.
16
+From the root of this project, issue the command `make docs`.
17 17
 Sphinx will render the output into doc/build/html. Open
18 18
 doc/build/html/index.html using your browser.

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

@@ -1,23 +0,0 @@
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
-

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

@@ -1,23 +0,0 @@
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

+ 1
- 1
tox.ini View File

@@ -15,4 +15,4 @@ whitelist_externals=
15 15
   rm
16 16
 commands=
17 17
   rm -rf doc/build
18
-  sphinx-build -b html doc/source doc/build -a -E -W
18
+  sphinx-build -W -b html doc/source doc/build/html

Loading…
Cancel
Save