diff --git a/.zuul.yaml b/.zuul.yaml index 962d8784..46a899ff 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,9 +1,14 @@ - project: - templates: - - openstack-specs-jobs check: jobs: + - openstack-tacker-tox-docs - openstack-tox-pep8 gate: jobs: + - openstack-tacker-tox-docs - openstack-tox-pep8 + +- job: + name: openstack-tacker-tox-docs + parent: openstack-tox-docs + pre-run: playbooks/pre.yaml diff --git a/README.rst b/README.rst index 1821015c..6a83a194 100644 --- a/README.rst +++ b/README.rst @@ -44,10 +44,15 @@ For more information about working with gerrit, see:: https://docs.openstack.org/infra/manual/developers.html#development-workflow To validate that the specification is syntactically correct (i.e. get more -confidence in the Jenkins result), please execute the following command:: +confidence in the Zuul result), please execute the following command:: $ tox +Note that you need to install Java such as openjdk_ in advance to run ``tox`` +as the plantUML which depends on Java is used inside some specs. + After running ``tox``, the documentation will be available for viewing in HTML format in the ``doc/build/`` directory. Please do not checkin the generated HTML files as a part of your commit. + +.. _openjdk: https://openjdk.org/install/ diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 00000000..4d956093 --- /dev/null +++ b/bindep.txt @@ -0,0 +1 @@ +graphviz diff --git a/doc/requirements.txt b/doc/requirements.txt index 006c2bbe..07b6b997 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -8,3 +8,4 @@ sphinxcontrib-actdiag # BSD sphinxcontrib-blockdiag # BSD sphinxcontrib-nwdiag # BSD sphinxcontrib-seqdiag # BSD +sphinxcontrib-plantuml # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 8806f1e1..c1db8909 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -12,6 +12,7 @@ # serve to show the default. import datetime +import os # 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 @@ -32,6 +33,7 @@ extensions = [ 'sphinxcontrib.actdiag', 'sphinxcontrib.seqdiag', 'sphinxcontrib.nwdiag', + 'sphinxcontrib.plantuml', 'openstackdocstheme', ] @@ -233,3 +235,5 @@ openstackdocs_repo_name = 'openstack/tacker-specs' openstackdocs_auto_name = False openstackdocs_bug_project = 'tacker' openstackdocs_bug_tag = 'doc' + +plantuml = f'java -jar {os.path.abspath(".")}/../../tools/plantuml.jar' diff --git a/playbooks/pre.yaml b/playbooks/pre.yaml new file mode 100644 index 00000000..52197ac8 --- /dev/null +++ b/playbooks/pre.yaml @@ -0,0 +1,3 @@ +- hosts: all + roles: + - ensure-java diff --git a/setup.cfg b/setup.cfg index 7ff1e74e..5175bc7c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,3 +10,6 @@ classifier = Intended Audience :: Developers License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux +[files] +packages = + specs diff --git a/specs/2023.2/placeholder.rst b/specs/2023.2/placeholder.rst index 9aaa6f08..08d9fca7 100644 --- a/specs/2023.2/placeholder.rst +++ b/specs/2023.2/placeholder.rst @@ -30,6 +30,17 @@ Proposed change Add this file. Please remove later when the another spec is approved. +.. uml:: + + @startuml + + [First component] + [Another component] as Comp2 + component Comp3 + component [Last\ncomponent] as Comp4 + + @enduml + Alternatives ------------ diff --git a/specs/template.rst b/specs/template.rst index fe7ff91e..3c43ca77 100644 --- a/specs/template.rst +++ b/specs/template.rst @@ -110,6 +110,19 @@ seqdiag } +* PlantUML examples + +.. uml:: + + @startuml + + [First component] + [Another component] as Comp2 + component Comp3 + component [Last\ncomponent] as Comp4 + + @enduml + Problem description =================== diff --git a/tools/plantuml.jar b/tools/plantuml.jar new file mode 100644 index 00000000..3ae05b3c Binary files /dev/null and b/tools/plantuml.jar differ