Adding support for javadoc plugin

Change-Id: I857d868ad0a953674fc45977bafc1766e43ebcfe
This commit is contained in:
Somay Jain
2015-06-27 22:01:28 +05:30
parent b48592565f
commit 2c1a31a93e
4 changed files with 40 additions and 0 deletions

View File

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

View File

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

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

View File

@@ -0,0 +1,4 @@
publishers:
- javadoc:
directory: myproject/build/javadoc
keep-all-successful: true