Merge "Update copy-to-slave plugin"
This commit is contained in:
commit
6b5a9625ba
@ -2177,8 +2177,10 @@ def copy_to_master(registry, xml_parent, data):
|
|||||||
:arg list includes: list of file patterns to copy
|
:arg list includes: list of file patterns to copy
|
||||||
:arg list excludes: list of file patterns to exclude
|
:arg list excludes: list of file patterns to exclude
|
||||||
:arg string destination: absolute path into which the files will be copied.
|
:arg string destination: absolute path into which the files will be copied.
|
||||||
If left blank they will be copied into the
|
If left blank they will be copied into the workspace of the current job
|
||||||
workspace of the current job
|
(default '')
|
||||||
|
:arg bool run-after-result: If this is checked then copying files back to
|
||||||
|
master will not run until the build result is finalized.(default true)
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -2186,14 +2188,17 @@ def copy_to_master(registry, xml_parent, data):
|
|||||||
/../../tests/publishers/fixtures/copy-to-master001.yaml
|
/../../tests/publishers/fixtures/copy-to-master001.yaml
|
||||||
:language: yaml
|
:language: yaml
|
||||||
"""
|
"""
|
||||||
p = 'com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier'
|
cm = XML.SubElement(xml_parent, 'com.michelin.'
|
||||||
cm = XML.SubElement(xml_parent, p)
|
'cio.hudson.plugins.copytoslave.CopyToMasterNotifier')
|
||||||
|
cm.set('plugin', 'copy-to-slave')
|
||||||
|
|
||||||
XML.SubElement(cm, 'includes').text = ','.join(data.get('includes', ['']))
|
XML.SubElement(cm, 'includes').text = ','.join(data.get('includes', ['']))
|
||||||
XML.SubElement(cm, 'excludes').text = ','.join(data.get('excludes', ['']))
|
XML.SubElement(cm, 'excludes').text = ','.join(data.get('excludes', ['']))
|
||||||
|
mappings = [
|
||||||
XML.SubElement(cm, 'destinationFolder').text = \
|
('run-after-result', 'runAfterResultFinalised', True),
|
||||||
data.get('destination', '')
|
('destination', 'destinationFolder', '')
|
||||||
|
]
|
||||||
|
helpers.convert_mapping_to_xml(cm, data, mappings, fail_required=True)
|
||||||
|
|
||||||
if data.get('destination', ''):
|
if data.get('destination', ''):
|
||||||
XML.SubElement(cm, 'overrideDestinationFolder').text = 'true'
|
XML.SubElement(cm, 'overrideDestinationFolder').text = 'true'
|
||||||
|
@ -8,9 +8,10 @@
|
|||||||
<command>ls file*</command>
|
<command>ls file*</command>
|
||||||
</condition>
|
</condition>
|
||||||
<runner class="org.jenkins_ci.plugins.run_condition.BuildStepRunner$DontRun"/>
|
<runner class="org.jenkins_ci.plugins.run_condition.BuildStepRunner$DontRun"/>
|
||||||
<publisher class="com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier">
|
<publisher class="com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier" plugin="copy-to-slave">
|
||||||
<includes>file1,file2*.txt</includes>
|
<includes>file1,file2*.txt</includes>
|
||||||
<excludes>file2bad.txt</excludes>
|
<excludes>file2bad.txt</excludes>
|
||||||
|
<runAfterResultFinalised>true</runAfterResultFinalised>
|
||||||
<destinationFolder/>
|
<destinationFolder/>
|
||||||
</publisher>
|
</publisher>
|
||||||
</org.jenkins__ci.plugins.flexible__publish.ConditionalPublisher>
|
</org.jenkins__ci.plugins.flexible__publish.ConditionalPublisher>
|
||||||
@ -24,4 +25,4 @@
|
|||||||
</publishers>
|
</publishers>
|
||||||
</org.jenkins__ci.plugins.flexible__publish.FlexiblePublisher>
|
</org.jenkins__ci.plugins.flexible__publish.FlexiblePublisher>
|
||||||
</publishers>
|
</publishers>
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<publishers>
|
<publishers>
|
||||||
<com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier>
|
<com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier plugin="copy-to-slave">
|
||||||
<includes>file1,file2*.txt</includes>
|
<includes>file1,file2*.txt</includes>
|
||||||
<excludes>file2bad.txt</excludes>
|
<excludes>file2bad.txt</excludes>
|
||||||
|
<runAfterResultFinalised>true</runAfterResultFinalised>
|
||||||
<destinationFolder/>
|
<destinationFolder/>
|
||||||
</com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier>
|
</com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier>
|
||||||
</publishers>
|
</publishers>
|
||||||
|
Loading…
Reference in New Issue
Block a user