From d18c3cb1f5100914696eba7f5e6c3e7231ccd0f9 Mon Sep 17 00:00:00 2001 From: Khai Do Date: Mon, 9 Sep 2013 10:30:01 -0700 Subject: [PATCH] Add usage info to JJB documentation Display the usage info for JJB and add it to the sphinx docs. Fixes bug 1221944 Change-Id: I5b36cca7a836b009bfb0ca880abbccd4477de307 --- doc/source/conf.py | 2 +- doc/source/installation.rst | 12 ++++++------ tools/test-requires | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 9df37dd86..1db175c05 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -27,7 +27,7 @@ sys.path.insert(0, os.path.abspath('../../jenkins_jobs/modules')) # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', - 'jenkins_jobs.sphinx.yaml'] + 'jenkins_jobs.sphinx.yaml', 'sphinxcontrib.programoutput'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/doc/source/installation.rst b/doc/source/installation.rst index 7c983e066..e25355f98 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -48,14 +48,14 @@ Running After it's installed and configured, you can invoke Jenkins Job Builder by running ``jenkins-jobs``. You won't be able to do anything useful just yet without a configuration which is discussed in the next -section). But you should be able to get help on the various commands -by running:: +section. - jenkins-jobs --help - jenkins-jobs update --help - jenkins-jobs test --help - (etc.) +Usage +^^^^^ +.. program-output:: jenkins-jobs --help +Testing +^^^^^^^ Once you have a configuration defined, you can test it with:: jenkins-jobs test /path/to/config -o /path/to/output diff --git a/tools/test-requires b/tools/test-requires index 1d0b37209..d3460c4d8 100644 --- a/tools/test-requires +++ b/tools/test-requires @@ -6,3 +6,4 @@ setuptools_git>=0.4 testscenarios testtools testrepository +sphinxcontrib-programoutput