Add support for chuck_norris publisher

Change-Id: If3fb61c9a9ec43059a9cd1950680c2334be6178d
This commit is contained in:
Sylvain Baubeau 2017-06-14 23:16:17 +02:00
parent 3799ed2c98
commit 903de89fd1
3 changed files with 28 additions and 0 deletions

View File

@ -6846,6 +6846,24 @@ def github_pull_request_merge(registry, xml_parent, data):
helpers.convert_mapping_to_xml(osb, data, mapping, fail_required=True)
def chuck_norris(registry, xml_parent, data):
"""yaml: chuck-norris
Displays a picture of Chuck Norris (instead of Jenkins the butler) and a
random Chuck Norris 'The Programmer' fact on each build page.
Requires the Jenkins :jenkins-wiki:`ChuckNorris Plugin
<ChuckNorris+Plugin>`.
Example:
.. literalinclude:: /../../tests/publishers/fixtures/chuck-norris.yaml
:language: yaml
"""
chuck = XML.SubElement(xml_parent,
'hudson.plugins.chucknorris.CordellWalkerRecorder')
return XML.SubElement(chuck, "factGenerator")
class Publishers(jenkins_jobs.modules.base.Base):
sequence = 70

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<publishers>
<hudson.plugins.chucknorris.CordellWalkerRecorder>
<factGenerator/>
</hudson.plugins.chucknorris.CordellWalkerRecorder>
</publishers>
</project>

View File

@ -0,0 +1,2 @@
publishers:
- chuck-norris