Merge "Add 'publishers-from' to the publishers module"
This commit is contained in:
commit
9462a710f1
@ -7586,6 +7586,25 @@ def chuck_norris(registry, xml_parent, data):
|
|||||||
return XML.SubElement(chuck, "factGenerator")
|
return XML.SubElement(chuck, "factGenerator")
|
||||||
|
|
||||||
|
|
||||||
|
def publishers_from(registry, xml_parent, data):
|
||||||
|
"""yaml: publishers-from
|
||||||
|
Use publishers from another project.
|
||||||
|
Requires the Jenkins :jenkins-wiki:`Template Project Plugin
|
||||||
|
<Template+Project+Plugin>`.
|
||||||
|
|
||||||
|
:arg str project-name: The name of the other project.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
.. literalinclude:: ../../tests/publishers/fixtures/publishers-from.yaml
|
||||||
|
:language: yaml
|
||||||
|
"""
|
||||||
|
pbs = XML.SubElement(xml_parent,
|
||||||
|
'hudson.plugins.templateproject.ProxyPublisher')
|
||||||
|
mapping = [('project-name', 'projectName', None)]
|
||||||
|
helpers.convert_mapping_to_xml(pbs, data, mapping, fail_required=True)
|
||||||
|
|
||||||
|
|
||||||
def tasks(registry, xml_parent, data):
|
def tasks(registry, xml_parent, data):
|
||||||
"""yaml: tasks
|
"""yaml: tasks
|
||||||
|
|
||||||
|
8
tests/publishers/fixtures/publishers-from.xml
Normal file
8
tests/publishers/fixtures/publishers-from.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project>
|
||||||
|
<publishers>
|
||||||
|
<hudson.plugins.templateproject.ProxyPublisher>
|
||||||
|
<projectName>base-build</projectName>
|
||||||
|
</hudson.plugins.templateproject.ProxyPublisher>
|
||||||
|
</publishers>
|
||||||
|
</project>
|
3
tests/publishers/fixtures/publishers-from.yaml
Normal file
3
tests/publishers/fixtures/publishers-from.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
publishers:
|
||||||
|
- publishers-from:
|
||||||
|
project-name: base-build
|
Loading…
x
Reference in New Issue
Block a user