Merge "Add 'publishers-from' to the publishers module"

This commit is contained in:
Zuul 2019-04-10 01:13:17 +00:00 committed by Gerrit Code Review
commit 9462a710f1
3 changed files with 30 additions and 0 deletions

View File

@ -7586,6 +7586,25 @@ def chuck_norris(registry, xml_parent, data):
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):
"""yaml: tasks

View 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>

View File

@ -0,0 +1,3 @@
publishers:
- publishers-from:
project-name: base-build