def copy_to_master(registry, xml_parent, data):
 cm = XML.SubElement(xml_parent, 'com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier')
 cm.set('plugin', 'copy-to-slave')
 XML.SubElement(cm, 'includes').text = ','.join(data.get('includes', ['']))
 XML.SubElement(cm, 'excludes').text = ','.join(data.get('excludes', ['']))
 mappings = [('run-after-result', 'runAfterResultFinalised', True), ('destination', 'destinationFolder', '')]
 helpers.convert_mapping_to_xml(cm, data, mappings, fail_required=True)
 if data.get('destination', ''):
  XML.SubElement(cm, 'overrideDestinationFolder').text = 'true'

def copy_to_master ( registry , xml_parent , data ) : cm = XML . SubElement ( xml_parent , 'com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier' ) cm . set ( 'plugin' , 'copy-to-slave' ) XML . SubElement ( cm , 'includes' ) . text = ',' . join ( data . get ( 'includes' , [ '' ] ) ) XML . SubElement ( cm , 'excludes' ) . text = ',' . join ( data . get ( 'excludes' , [ '' ] ) ) mappings = [ ( 'run-after-result' , 'runAfterResultFinalised' , True ) , ( 'destination' , 'destinationFolder' , '' ) ] helpers . convert_mapping_to_xml ( cm , data , mappings , fail_required = True ) if data . get ( 'destination' , '' ) : XML . SubElement ( cm , 'overrideDestinationFolder' ) . text = 'true'
yaml: copy-to-master copy files to master from slave requires the jenkins :jenkins-wiki:copy to slave plugin <copy+to+slave+plugin> .