Add support for chuck_norris publisher
Change-Id: If3fb61c9a9ec43059a9cd1950680c2334be6178d
This commit is contained in:
parent
3799ed2c98
commit
903de89fd1
@ -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
|
||||
|
||||
|
8
tests/publishers/fixtures/chuck-norris.xml
Normal file
8
tests/publishers/fixtures/chuck-norris.xml
Normal 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>
|
2
tests/publishers/fixtures/chuck-norris.yaml
Normal file
2
tests/publishers/fixtures/chuck-norris.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
publishers:
|
||||
- chuck-norris
|
Loading…
Reference in New Issue
Block a user