Merge "Add support for chuck_norris publisher"

This commit is contained in:
Jenkins 2017-06-20 16:16:57 +00:00 committed by Gerrit Code Review
commit fc7d6088d0
3 changed files with 28 additions and 0 deletions
jenkins_jobs/modules
tests/publishers/fixtures

@ -6837,6 +6837,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

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

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