DocsCommand - evansde77/cirrus GitHub Wiki
Command for publishing Sphinx documentation
Usage:
git cirrus docs build
git cirrus docs pack
git cirrus docs publish
Options and config:
-
git cirrus docs build
:--make <options>
- When run without
--make
, the default optionsclean html
are used - Requires a
sphinx_makefile_dir
value set in thedoc
section of cirrus.conf. -
sphinx_makefile_dir
should point to the directory that contains Sphinx's Makefile.
- When run without
-
git cirrus docs pack
requires the following options in cirrus.conf [doc] section:- sphinx_doc_dir - should point to the directory where the documentation to be packaged is. E.g. /docs/_build/html
- artifact_dir - should point to the directory where the documentation artifact should be saved.
-
git cirrus docs publish
requires the following options in cirrus.conf [doc] section:- publisher - the publisher plugin to use
- The publisher selected should have a section in cirrus.conf which contains the publisher options. Available publisher plugins can be found in /cirrus/plugins/publishers
- If using the
doc_file_server
plugin:- in cirrus.conf:
- doc_file_server_url - the URL of the server the documentation is uploaded to
- doc_file_server_upload_path - the path to the location on the server the documentation should be uploaded to
- doc_file_server_sudo - a value of True or False for if sudo should be used when issuing the Fabric
put
command Note: Optional if doc_file_server_sudo is False
- in the [cirrus] section of your .gitconfig:
- file-server-username - the username used for the documentation file server
- file-server-keyfile - the path the ssh keyfile to use when uploading the documentation
- in cirrus.conf:
- If using the
jenkins
plugin:- in cirrus.conf:
- url - the URL of the Jenkins server
- doc_job - the name of the Jenkins job for the documentation build
- doc_var - the variable name which the uploaded documentation tarball will be accessed by (Jenkins File Parameter)
- arc_var - the variable that will be used to name the file/folder the archive should be unpacked to as determined by the name of the archive filename. I.e. package-0.0.0.tar.gz => package-0.0.0 (Jenkins String Parameter)
- extra_vars - boolean value indicating if there are move variables to send to Jenkins which should be defined in the section [jenkins_docs_extra_vars]
- in the [cirrus] section of your .gitconfig:
- buildserver-user - Jenkins username for authorization
- buildserver-token - token or password for authorization
- in cirrus.conf:
- If using the
Example cirrus.conf:
[doc]
sphinx_makefile_dir = docs/
sphinx_doc_dir = docs/_build/html
artifact_dir = docs/artifacts
publisher = doc_file_server
[doc_file_server]
doc_file_server_url = http://localhost:8080
doc_file_server_upload_path = /docs/package/archive
doc_file_server_sudo = True
If using publisher = jenkins
:
[jenkins]
url = https://localhost:8080
doc_job = doc_build
doc_var = artifact
arc_var = ARCHIVE
extra_vars = True
[jenkins_docs_extra_vars]
var = value
var1 = value1