def ftp_publisher(registry, xml_parent, data):
 ftp = XML.SubElement(xml_parent, 'com.zanox.hudson.plugins.FTPPublisher')
 ftp.set('plugin', 'ftppublisher')
 entries = XML.SubElement(ftp, 'entries')
 if ('uploads' in data):
  upload_mapping = [('file-path', 'filePath', ''), ('source-file', 'sourceFile', '')]
  for upload in data['uploads']:
   entry = XML.SubElement(entries, 'com.zanox.hudson.plugins.Entry')
   helpers.convert_mapping_to_xml(entry, upload, upload_mapping, fail_required=True)
 mapping = [('site-name', 'siteName', None), ('use-timestamps', 'useTimestamps', False), ('flatten-files', 'flatten', False), ('skip-publishing', 'skip', False)]
 helpers.convert_mapping_to_xml(ftp, data, mapping, fail_required=True)

def ftp_publisher ( registry , xml_parent , data ) : ftp = XML . SubElement ( xml_parent , 'com.zanox.hudson.plugins.FTPPublisher' ) ftp . set ( 'plugin' , 'ftppublisher' ) entries = XML . SubElement ( ftp , 'entries' ) if ( 'uploads' in data ) : upload_mapping = [ ( 'file-path' , 'filePath' , '' ) , ( 'source-file' , 'sourceFile' , '' ) ] for upload in data [ 'uploads' ] : entry = XML . SubElement ( entries , 'com.zanox.hudson.plugins.Entry' ) helpers . convert_mapping_to_xml ( entry , upload , upload_mapping , fail_required = True ) mapping = [ ( 'site-name' , 'siteName' , None ) , ( 'use-timestamps' , 'useTimestamps' , False ) , ( 'flatten-files' , 'flatten' , False ) , ( 'skip-publishing' , 'skip' , False ) ] helpers . convert_mapping_to_xml ( ftp , data , mapping , fail_required = True )
yaml: ftp-publisher this plugin can be used to upload project artifacts and whole directories to an ftp server .