Adding support for javadoc plugin
Change-Id: I857d868ad0a953674fc45977bafc1766e43ebcfe
This commit is contained in:
@@ -148,6 +148,32 @@ def jclouds(parser, xml_parent, data):
|
||||
data.get('hierarchy', False)).lower()
|
||||
|
||||
|
||||
def javadoc(parser, xml_parent, data):
|
||||
"""yaml: javadoc
|
||||
Publish Javadoc
|
||||
Requires the Jenkins :jenkins-wiki:`Javadoc Plugin <Javadoc+Plugin>`.
|
||||
|
||||
:arg str directory: Directory relative to the root of the workspace,
|
||||
such as 'myproject/build/javadoc' (optional)
|
||||
:arg bool keep-all-successful: When true, it will retain Javadoc for each
|
||||
successful build. This allows you to browse Javadoc for older builds,
|
||||
at the expense of additional disk space requirement. If false, it will
|
||||
only keep the latest Javadoc, so older Javadoc will be overwritten as
|
||||
new builds succeed. (default false)
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude:: /../../tests/publishers/fixtures/javadoc001.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
|
||||
root = XML.SubElement(xml_parent, 'hudson.tasks.JavadocArchiver')
|
||||
if 'directory' in data:
|
||||
XML.SubElement(root, 'javadocDir').text = data.get('directory', '')
|
||||
XML.SubElement(root, 'keepAll').text = str(data.get(
|
||||
'keep-all-successful', False)).lower()
|
||||
|
||||
|
||||
def campfire(parser, xml_parent, data):
|
||||
"""yaml: campfire
|
||||
Send build notifications to Campfire rooms.
|
||||
|
||||
@@ -167,6 +167,7 @@ jenkins_jobs.publishers =
|
||||
ircbot=jenkins_jobs.modules.publishers:ircbot
|
||||
jabber=jenkins_jobs.modules.publishers:jabber
|
||||
jacoco=jenkins_jobs.modules.publishers:jacoco
|
||||
javadoc=jenkins_jobs.modules.publishers:javadoc
|
||||
jclouds=jenkins_jobs.modules.publishers:jclouds
|
||||
jira=jenkins_jobs.modules.publishers:jira
|
||||
join-trigger=jenkins_jobs.modules.publishers:join_trigger
|
||||
|
||||
9
tests/publishers/fixtures/javadoc001.xml
Normal file
9
tests/publishers/fixtures/javadoc001.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<publishers>
|
||||
<hudson.tasks.JavadocArchiver>
|
||||
<javadocDir>myproject/build/javadoc</javadocDir>
|
||||
<keepAll>true</keepAll>
|
||||
</hudson.tasks.JavadocArchiver>
|
||||
</publishers>
|
||||
</project>
|
||||
4
tests/publishers/fixtures/javadoc001.yaml
Normal file
4
tests/publishers/fixtures/javadoc001.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
publishers:
|
||||
- javadoc:
|
||||
directory: myproject/build/javadoc
|
||||
keep-all-successful: true
|
||||
Reference in New Issue
Block a user