Unify publishing of docs

Unified publishing to the readthedocs with other Airship projects.

Change-Id: I88e7e952c366fa2679e56ab07cb4c7557d905ad9
This commit is contained in:
Roman Gorshunov 2018-09-17 16:23:01 +02:00
parent d1fca12693
commit 20c81644e1
6 changed files with 40 additions and 122 deletions

View File

@ -1,62 +1,17 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- project:
check:
jobs:
- airship-specs-doc-build
gate:
jobs:
- airship-specs-doc-build
post:
jobs:
- airship-specs-doc-publish
- nodeset:
name: airship-specs-single-node
nodes:
- name: primary
label: ubuntu-xenial
- job:
name: airship-specs-doc-build
description: |
Build documents locally to validate functionality
run: gate/playbooks/doc-build.yaml
timeout: 900
nodeset: airship-specs-single-node
- job:
name: airship-specs-doc-publish
description: |
Publish documentation on airship-specs.readthedocs.io
run: gate/playbooks/doc-publish.yaml
secrets:
- airship_specs_readthedocs
timeout: 300
nodeset: airship-specs-single-node
- secret:
name: airship_specs_readthedocs
data:
url: !encrypted/pkcs1-oaep
- THj6TIhcV42OhTsG1mA59bUbeKNd/64KCt2Bnqh8D+Fjr2VbaojqHT51/UhuRf+y4BKDi
Hlaf0kNUS0X4VB5QanDh/mKlU/GhMIyUBCD1PlzMxiefcVl04F+Z0GKlPXJ+qzKYRYK6F
2i4m8PeCGa8otqUiiqznY0US5Rb0++dEZ6ipuFuaLDl7mmV4MqWuPVJdpBuYqsH/OP6Hd
VPvSw68Arbqo7n/hriCoI5ZVx9Xk8xhfSTCkUDjhEaHEr+ECTPZLxqmArPEi+gGwEqiLa
LWwftEeDc2OaSL0X8XlAcCGFYJeLRp5uCTIOh2T0HuIgZxPJ1aHyvvyd3ieyw+ndx27og
D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s
vars:
rtd_webhook_id: '43959'

View File

@ -1,15 +1,24 @@
# Minimal makefile for Sphinx documentation
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# You can set these variables from the command line.
# TODO: Incorporate these vars into tox file
SPHINXOPTS = -a -E -W
SPHINXBUILD = sphinx-build
SPHINXPROJ = airship-specs
SOURCEDIR = doc/source
BUILDDIR = doc/build
.PHONY: docs
docs: clean build_docs
docs:
tox
.PHONY: clean
clean:
rm -rf doc/build
%: docs
.PHONY: build_docs
build_docs:
tox -e docs

View File

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

View File

@ -1,23 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Combine several test tasks into a single playbook
# to minimize Zuul node consumption
- hosts: primary
tasks:
- name: Build documents locally
make:
chdir: "{{ zuul.project.src_dir }}"
target: docs
register: result

View File

@ -1,23 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- hosts: primary
tasks:
- name: Publish current merged documents on readthedocs
no_log: true
uri:
method: 'POST'
body_format: 'json'
url: '{{ airship_specs_readthedocs.url | trim}}'
body:
token: '{{ airship_specs_readthedocs.token | trim }}'
register: result

View File

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