use jjb tests as the examples

So during my reviews of jjb code I've noticed that many of the examples in
the documentation are either not correct or are out of date.  So instead of
documenting examples in the source I think it would be preferable to
have a test for every module and use that test as the example for the
module.  We run the tests continuously so this will keep the examples
working and up to date.

This patch starts with the scp module.

Change-Id: I161fa22359f8ecb2ae9e511d204c1fa0bce48581
This commit is contained in:
Khai Do 2013-11-18 23:47:52 +00:00
parent 9475eeceaf
commit 941d10e091
2 changed files with 2 additions and 21 deletions

View File

@ -21,17 +21,6 @@ the build is complete.
**Component**: publishers
:Macro: publisher
:Entry Point: jenkins_jobs.publishers
Example::
job:
name: test_job
publishers:
- scp:
site: 'example.com'
files:
- target: 'dest/dir'
source: 'base/source/dir/**'
"""
@ -942,16 +931,9 @@ def scp(parser, xml_parent, data):
:arg bool copy-console: copy the console log (default false); if
specified, omit 'target'
Example::
Example:
publishers:
- scp:
site: 'example.com'
files:
- target: 'dest/dir'
source: 'base/source/dir/**'
keep-hierarchy: true
copy-after-failure: true
.. literalinclude:: ../../tests/publishers/fixtures/scp001.yaml
"""
site = data['site']
scp = XML.SubElement(xml_parent,

View File

@ -1,4 +1,3 @@
# vim: sw=4 ts=4 et
publishers:
- scp:
site: 'example.com'