feat(docs): adds documentation job

This adds a document zuul job and a base docs folder for technical
docs, user guides, etc. to the repository. This also publish the
documentation as part of promote-airship-project-docs.

Signed-off-by: Tin Lam <tin@irrational.io>
Change-Id: I6dd049bdc7454355440fcb28ade7a36f0810857a
This commit is contained in:
Tin Lam 2020-12-11 12:19:19 -06:00 committed by Stacey Fletcher
parent e00a3f52eb
commit 75a4bddc25
8 changed files with 121 additions and 0 deletions

4
.gitignore vendored
View File

@ -1 +1,5 @@
**.tgz
# doc build environment and artifacts
doc/build
.tox/

7
doc/requirements.txt Normal file
View File

@ -0,0 +1,7 @@
# Documentation
sphinx>3.2.0
oslosphinx>=4.7.0 # Apache-2.0
sphinx_rtd_theme
# Sphinx markdown extension
recommonmark

View File

View File

65
doc/source/conf.py Normal file
View File

@ -0,0 +1,65 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import sphinx_rtd_theme
# -- Project information -----------------------------------------------------
project = 'airship-charts'
copyright = '2020, Airship Charts Authors'
author = 'Airship Charts Authors'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'recommonmark'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
html_theme_options = {
'display_version': False,
}
html_show_sourcelink = False
html_show_sphinx = False
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Source files
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}

20
doc/source/index.rst Normal file
View File

@ -0,0 +1,20 @@
.. airship-charts documentation master file, created by
sphinx-quickstart on Fri Dec 11 11:59:00 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to airship-charts's documentation!
==========================================
.. toctree::
:maxdepth: 2
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

18
tox.ini Normal file
View File

@ -0,0 +1,18 @@
[tox]
minversion = 3.2.0
skipsdist = True
envlist = docs
[testenv]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:docs]
basepython = python3
whitelist_externals = rm
deps =
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
sphinx-build -W -b html doc/source doc/build/html

View File

@ -13,12 +13,19 @@
- project:
check:
jobs:
- openstack-tox-docs: &docs
files:
- ^doc/.*$
- airship-charts-lint-and-build
- airship-harbor-tekton
gate:
jobs:
- openstack-tox-docs: *docs
- airship-charts-lint-and-build
- airship-harbor-tekton
post:
jobs:
- airship-charts-upload-git-mirror
promote:
jobs:
- promote-airship-project-docs: *docs