def copy_to_slave(registry, xml_parent, data):
 p = 'com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper'
 cs = XML.SubElement(xml_parent, p)
 XML.SubElement(cs, 'includes').text = ','.join(data.get('includes', ['']))
 XML.SubElement(cs, 'excludes').text = ','.join(data.get('excludes', ['']))
 XML.SubElement(cs, 'flatten').text = str(data.get('flatten', False)).lower()
 XML.SubElement(cs, 'includeAntExcludes').text = str(data.get('include-ant-excludes', False)).lower()
 rel = str(data.get('relative-to', 'userContent'))
 opt = ('home', 'somewhereElse', 'userContent', 'workspace')
 if (rel not in opt):
  raise ValueError(('relative-to must be one of %r' % opt))
 XML.SubElement(cs, 'relativeTo').text = rel
 XML.SubElement(cs, 'hudsonHomeRelative').text = 'false'

def copy_to_slave ( registry , xml_parent , data ) : p = 'com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper' cs = XML . SubElement ( xml_parent , p ) XML . SubElement ( cs , 'includes' ) . text = ',' . join ( data . get ( 'includes' , [ '' ] ) ) XML . SubElement ( cs , 'excludes' ) . text = ',' . join ( data . get ( 'excludes' , [ '' ] ) ) XML . SubElement ( cs , 'flatten' ) . text = str ( data . get ( 'flatten' , False ) ) . lower ( ) XML . SubElement ( cs , 'includeAntExcludes' ) . text = str ( data . get ( 'include-ant-excludes' , False ) ) . lower ( ) rel = str ( data . get ( 'relative-to' , 'userContent' ) ) opt = ( 'home' , 'somewhereElse' , 'userContent' , 'workspace' ) if ( rel not in opt ) : raise ValueError ( ( 'relative-to must be one of %r' % opt ) ) XML . SubElement ( cs , 'relativeTo' ) . text = rel XML . SubElement ( cs , 'hudsonHomeRelative' ) . text = 'false'
yaml: copy-to-slave copy files to slave before build requires the jenkins :jenkins-wiki:copy to slave plugin <copy+to+slave+plugin> .