Merge "Add sphinx plantUML pluging"

This commit is contained in:
Zuul 2023-07-10 17:25:47 +00:00 committed by Gerrit Code Review
commit 1bdece75fe
10 changed files with 49 additions and 3 deletions

View File

@ -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

View File

@ -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/

1
bindep.txt Normal file
View File

@ -0,0 +1 @@
graphviz

View File

@ -8,3 +8,4 @@ sphinxcontrib-actdiag # BSD
sphinxcontrib-blockdiag # BSD
sphinxcontrib-nwdiag # BSD
sphinxcontrib-seqdiag # BSD
sphinxcontrib-plantuml # BSD

View File

@ -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'

3
playbooks/pre.yaml Normal file
View File

@ -0,0 +1,3 @@
- hosts: all
roles:
- ensure-java

View File

@ -10,3 +10,6 @@ classifier =
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
[files]
packages =
specs

View File

@ -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
------------

View File

@ -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
===================

BIN
tools/plantuml.jar Normal file

Binary file not shown.