Merge "Add 'Job Log Logger' wrapper"

This commit is contained in:
Jenkins 2015-03-19 23:33:59 +00:00 committed by Gerrit Code Review
commit 8a8595f057
4 changed files with 33 additions and 0 deletions

View File

@ -1331,6 +1331,27 @@ def xvnc(parser, xml_parent, data):
data.get('xauthority', True)).lower()
def job_log_logger(parser, xml_parent, data):
"""yaml: job-log-logger
Enable writing the job log to the underlying logging system.
Requires the Jenkins :jenkins-wiki:`Job Log Logger plugin
<Job+Log+Logger+Plugin>`.
:arg bool suppress-empty: Suppress empty log messages
(default: true)
Example:
.. literalinclude:: /../../tests/wrappers/fixtures/job-log-logger001.yaml
"""
top = XML.SubElement(xml_parent,
'org.jenkins.ci.plugins.jobloglogger.'
'JobLogLoggerBuildWrapper')
XML.SubElement(top, 'suppressEmpty').text = str(
data.get('suppress-empty', True)).lower()
class Wrappers(jenkins_jobs.modules.base.Base):
sequence = 80

View File

@ -222,6 +222,7 @@ jenkins_jobs.wrappers =
inject-passwords=jenkins_jobs.modules.wrappers:inject_passwords
inject=jenkins_jobs.modules.wrappers:inject
jclouds=jenkins_jobs.modules.wrappers:jclouds
job-log-logger=jenkins_jobs.modules.wrappers:job_log_logger
locks=jenkins_jobs.modules.wrappers:locks
logfilesize=jenkins_jobs.modules.wrappers:logfilesize
logstash=jenkins_jobs.modules.wrappers:logstash

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<buildWrappers>
<org.jenkins.ci.plugins.jobloglogger.JobLogLoggerBuildWrapper>
<suppressEmpty>false</suppressEmpty>
</org.jenkins.ci.plugins.jobloglogger.JobLogLoggerBuildWrapper>
</buildWrappers>
</project>

View File

@ -0,0 +1,3 @@
wrappers:
- job-log-logger:
suppress-empty: false